diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-05-07 23:19:14 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-05-07 23:19:14 +0000 |
commit | 756e95f19845d6194524bd9f4c37851f3f7b8de5 (patch) | |
tree | 54a975303969f9d0981b6c99edadb9fb51131968 /gdb/frame.c | |
parent | 2b4855ab6b8e69b375c49df490db63ececf17da8 (diff) | |
download | gdb-756e95f19845d6194524bd9f4c37851f3f7b8de5.zip gdb-756e95f19845d6194524bd9f4c37851f3f7b8de5.tar.gz gdb-756e95f19845d6194524bd9f4c37851f3f7b8de5.tar.bz2 |
* frame.c (get_prev_frame_1): Work around GCC bug.
* frame.h: Add comment about GCC bug.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r-- | gdb/frame.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/frame.c b/gdb/frame.c index 8fb0344..eba8605 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1609,6 +1609,7 @@ static struct frame_info * get_prev_frame_1 (struct frame_info *this_frame) { struct frame_info *prev_frame; + struct frame_id this_id; gdb_assert (this_frame != NULL); @@ -1646,7 +1647,8 @@ 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. */ - if (this_frame->level >= 0 && !frame_id_p (get_frame_id (this_frame))) + this_id = get_frame_id (this_frame); + if (this_frame->level >= 0 && !frame_id_p (this_id)) { if (frame_debug) { @@ -1663,16 +1665,14 @@ get_prev_frame_1 (struct frame_info *this_frame) go backwards) and sentinel frames (the test is meaningless). */ if (this_frame->next->level >= 0 && this_frame->next->type != SIGTRAMP_FRAME - && frame_id_inner (get_frame_id (this_frame), - get_frame_id (this_frame->next))) + && frame_id_inner (this_id, get_frame_id (this_frame->next))) 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))) + && frame_id_eq (this_id, get_frame_id (this_frame->next))) error ("Previous frame identical to this frame (corrupt stack?)"); /* Allocate the new frame but do not wire it in to the frame chain. |