This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[frameaddr-branch] Revert one frame_id_eq()
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 03 Apr 2003 23:27:58 -0500
- Subject: [frameaddr-branch] Revert one frame_id_eq()
Hello,
The attached reverts one of the frame_id_eq() tests back something
comparing the frame and pc. At that point in the legacy code the frame
ID wasn't yet valid.
The new code doesn't suffer from this confusion.
committed to branch,
Andrew
2003-04-03 Andrew Cagney <cagney at redhat dot com>
* frame.c (legacy_get_prev_frame): Revert a frame_id_eq test,
instead comparing the frame PCs.
Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.93.2.1
diff -u -r1.93.2.1 frame.c
--- frame.c 3 Apr 2003 17:01:48 -0000 1.93.2.1
+++ frame.c 4 Apr 2003 04:21:19 -0000
@@ -1415,8 +1415,10 @@
check this in DEPRECATED_FRAME_CHAIN or thereabouts, but it seems
like there is no reason this can't be an architecture-independent
check. */
- if (this_frame->level > 0
- && frame_id_eq (get_frame_id (prev), get_frame_id (this_frame)))
+ /* NOTE: cagney/2003-04-04: Don't convert this to frame_id_eq. At
+ this stage the ID's address is not valid, so need to use the pc. */
+ if (prev->id.stack_addr == this_frame->id.stack_addr
+ && get_frame_pc (prev) == get_frame_pc (this_frame))
{
this_frame->prev = NULL;
obstack_free (&frame_cache_obstack, prev);