diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-01-03 13:11:06 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-01-03 13:11:06 +0000 |
commit | ebedcab50d2c7699ced23f4cf4eae712c0a9ca40 (patch) | |
tree | f203ddc5ac237d64a2233448d8837045355078c0 /gdb/frame.c | |
parent | 42ea3d7a0895f6748f2f888d6e993bc0ba6cc013 (diff) | |
download | gdb-ebedcab50d2c7699ced23f4cf4eae712c0a9ca40.zip gdb-ebedcab50d2c7699ced23f4cf4eae712c0a9ca40.tar.gz gdb-ebedcab50d2c7699ced23f4cf4eae712c0a9ca40.tar.bz2 |
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 e36ba91..87122cd 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 |