diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-01-03 13:10:59 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-01-03 13:10:59 +0000 |
commit | 457da755a718113dcbc339f7823af0d439fa62c7 (patch) | |
tree | 09198d2a8ed6006ed9a80a2a52311e93222a1f59 /gdb/frame.c | |
parent | aefd15f62c6b46af4ffc9fd3ec8d849b03ebed50 (diff) | |
download | gdb-457da755a718113dcbc339f7823af0d439fa62c7.tar.gz |
gdb/
* frame.c (get_prev_frame_1) <UNWIND_INNER_ID>: New variables
this_pc_in_block, morestack_msym and morestack_name. Check for
"__morestack" minimal symbol there.
gdb/testsuite/
* gdb.base/morestack.exp: New file.
* gdb.base/morestack.c: New file.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r-- | gdb/frame.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/gdb/frame.c b/gdb/frame.c index e36ba919ea5..87122cd78a7 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1502,14 +1502,26 @@ get_prev_frame_1 (struct frame_info *this_frame) && frame_id_inner (get_frame_arch (this_frame->next), this_id, get_frame_id (this_frame->next))) { - if (frame_debug) + CORE_ADDR this_pc_in_block; + struct minimal_symbol *morestack_msym; + const char *morestack_name = NULL; + + /* gcc -fsplit-stack __morestack can continue the stack anywhere. */ + this_pc_in_block = get_frame_address_in_block (this_frame); + morestack_msym = lookup_minimal_symbol_by_pc (this_pc_in_block); + if (morestack_msym) + morestack_name = SYMBOL_LINKAGE_NAME (morestack_msym); + if (!morestack_name || strcmp (morestack_name, "__morestack") != 0) { - fprintf_unfiltered (gdb_stdlog, "-> "); - fprint_frame (gdb_stdlog, NULL); - fprintf_unfiltered (gdb_stdlog, " // this frame ID is inner }\n"); + if (frame_debug) + { + fprintf_unfiltered (gdb_stdlog, "-> "); + fprint_frame (gdb_stdlog, NULL); + fprintf_unfiltered (gdb_stdlog, " // this frame ID is inner }\n"); + } + this_frame->stop_reason = UNWIND_INNER_ID; + return NULL; } - this_frame->stop_reason = UNWIND_INNER_ID; - return NULL; } /* Check that this and the next frame are not identical. If they |