diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-07-07 20:07:12 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-07-07 20:07:12 +0000 |
commit | 612dde91c118a08a7973a377a0306fd02b666bf7 (patch) | |
tree | b204657323b99ef0b737c742d69fec113b959ce1 /gdb | |
parent | 492c11d3be7e793b50e43e18f3fb78a4ebdf2200 (diff) | |
download | binutils-612dde91c118a08a7973a377a0306fd02b666bf7.zip binutils-612dde91c118a08a7973a377a0306fd02b666bf7.tar.gz binutils-612dde91c118a08a7973a377a0306fd02b666bf7.tar.bz2 |
2003-07-07 Andrew Cagney <cagney@redhat.com>
* frame.c (get_prev_frame): Enable check for identical frames.
Update comments. Update error messages.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/frame.c | 24 |
2 files changed, 15 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 89c1ff5..4bb9448 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-07-07 Andrew Cagney <cagney@redhat.com> + + * frame.c (get_prev_frame): Enable check for identical frames. + Update comments. Update error messages. + 2003-07-07 Joel Brobecker <brobecker@gnat.com> * hpread.c (hpread_psymtab_to_symtab_1): Fix compilation failure. diff --git a/gdb/frame.c b/gdb/frame.c index 3793a06..23fb5b1 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1906,25 +1906,21 @@ get_prev_frame (struct frame_info *this_frame) } /* Check that this frame's ID isn't inner to (younger, below, next) - the next frame. This happens when frame unwind goes backwards. - Since the sentinel frame isn't valid, don't apply this if this - frame is entier the inner-most or sentinel frame. */ + the next frame. This happens when a frame unwind goes backwards. + Since the sentinel frame doesn't really exist, don't compare the + inner-most against that sentinel. */ if (this_frame->level > 0 && frame_id_inner (get_frame_id (this_frame), get_frame_id (this_frame->next))) - error ("This frame inner-to next frame (corrupt stack?)"); - - /* Check that this and the next frame are different. If they are - not, there is most likely a stack cycle. As with the inner-than - test, avoid the inner-most and sentinel frames. */ - /* FIXME: cagney/2003-03-17: Can't yet enable this this check. The - frame_id_eq() method doesn't yet use function addresses when - comparing frame IDs. */ - if (0 - && this_frame->level > 0 + error ("Previous frame inner to this frame (corrupt stack?)"); + + /* Check that this and the next frame are not identical. If they + are, there is most likely a stack cycle. As with the inner-than + test above, avoid comparing the inner-most and sentinel frames. */ + if (this_frame->level > 0 && frame_id_eq (get_frame_id (this_frame), get_frame_id (this_frame->next))) - error ("This frame identical to next frame (corrupt stack?)"); + error ("Previous frame identical to this frame (corrupt stack?)"); /* Allocate the new frame but do not wire it in to the frame chain. Some (bad) code in INIT_FRAME_EXTRA_INFO tries to look along |