summaryrefslogtreecommitdiff
path: root/gdb/frame.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2008-06-30 17:59:03 +0000
committerDaniel Jacobowitz <dan@debian.org>2008-06-30 17:59:03 +0000
commit91fc01fd38db26176b9408aeecf8b63ed91345f8 (patch)
tree64573d9185db9f7879e4cd34fd9bf9b42445d691 /gdb/frame.c
parentac88c276c3ad2d47a4c968fb16661a1cc6eb93ad (diff)
downloadgdb-91fc01fd38db26176b9408aeecf8b63ed91345f8.tar.gz
* frame.c (get_prev_frame_1): Call frame_unwind_find_by_frame
directly instead of get_frame_id.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r--gdb/frame.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/frame.c b/gdb/frame.c
index 937aced8d7d..a14367cf8ae 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -1180,9 +1180,13 @@ get_prev_frame_1 (struct frame_info *this_frame)
return this_frame->prev;
}
- /* If the frame id hasn't been built yet, it must be done before
- setting a stop reason. */
- this_id = get_frame_id (this_frame);
+ /* If the frame unwinder hasn't been selected yet, we must do so
+ before setting prev_p; otherwise the check for misbehaved
+ sniffers will think that this frame's sniffer tried to unwind
+ further (see frame_cleanup_after_sniffer). */
+ if (this_frame->unwind == NULL)
+ this_frame->unwind
+ = frame_unwind_find_by_frame (this_frame, &this_frame->prologue_cache);
this_frame->prev_p = 1;
this_frame->stop_reason = UNWIND_NO_REASON;
@@ -1190,6 +1194,7 @@ get_prev_frame_1 (struct frame_info *this_frame)
/* Check that this frame's ID was valid. If it wasn't, don't try to
unwind to the prev frame. Be careful to not apply this test to
the sentinel frame. */
+ this_id = get_frame_id (this_frame);
if (this_frame->level >= 0 && !frame_id_p (this_id))
{
if (frame_debug)