summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-04-04 04:25:35 +0000
committerAndrew Cagney <cagney@redhat.com>2003-04-04 04:25:35 +0000
commitf46a289cb18f363f41a4bef398dff60eb615a744 (patch)
tree6c1048151db094acd7c6d5831dbe653e20144c6a
parentde3375b747d17f0e3f4b27cd63a8e5d9f623bf4b (diff)
downloadbinutils-gdb-f46a289cb18f363f41a4bef398dff60eb615a744.tar.gz
2003-04-03 Andrew Cagney <cagney@redhat.com>
* frame.c (legacy_get_prev_frame): Revert a frame_id_eq test, instead comparing the frame PCs.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/frame.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4c3ec8f591c..a0eb7ff3a07 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2003-04-03 Andrew Cagney <cagney@redhat.com>
+ * frame.c (legacy_get_prev_frame): Revert a frame_id_eq test,
+ instead comparing the frame PCs.
+
+2003-04-03 Andrew Cagney <cagney@redhat.com>
+
* frame.c (frame_id_eq): Update. Compare function addresses.
(get_frame_func): New function.
(frame_func_unwind): New function.
diff --git a/gdb/frame.c b/gdb/frame.c
index fecb48949e6..8e42f589000 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -1415,8 +1415,10 @@ legacy_get_prev_frame (struct frame_info *this_frame)
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);