aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-11-09 18:14:10 +0000
committerAndrew Cagney <cagney@redhat.com>2002-11-09 18:14:10 +0000
commit15220c65c0b9ebd38aebfc5d707040b7f37ed2db (patch)
treea849c0a63c294afde6a3c15551dd9d14efe93cff /gdb/frame.c
parent95adb866d747a0c2c01a9369b55e4a26554e4597 (diff)
downloadgdb-15220c65c0b9ebd38aebfc5d707040b7f37ed2db.zip
gdb-15220c65c0b9ebd38aebfc5d707040b7f37ed2db.tar.gz
gdb-15220c65c0b9ebd38aebfc5d707040b7f37ed2db.tar.bz2
2002-11-09 Andrew Cagney <ac131313@redhat.com>
* frame.c (get_prev_frame): Test prev_p to identify a previously unwound frame. Initialize prev_p. * frame.h (struct frame_info): Add field prev_p. Expand prev/next comment.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r--gdb/frame.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/frame.c b/gdb/frame.c
index 8631584..bfefc77 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -742,13 +742,10 @@ get_prev_frame (struct frame_info *next_frame)
return current_frame;
}
- /* If we have the prev one, return it. */
- if (next_frame->prev)
- /* FIXME: cagney/2002-11-09: Rather than relying on ->PREV being
- non-NULL, there should be a predicate (->prev_p?). That would
- stop this function constantly trying to chain beyond the
- outermost frame. */
+ /* Only try to do the unwind once. */
+ if (next_frame->prev_p)
return next_frame->prev;
+ next_frame->prev_p = 1;
/* On some machines it is possible to call a function without
setting up a stack frame for it. On these machines, we