summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-03-11 17:47:13 +0000
committerAndrew Cagney <cagney@redhat.com>2003-03-11 17:47:13 +0000
commit4abaad7382358a1e27f8aef3b9278ea2c78a28a7 (patch)
tree539325c05833340b7cc14788914d3f562e8e68e4
parent7ea497b0925741f7a2a7319427d0f9475279c276 (diff)
downloadgdb-4abaad7382358a1e27f8aef3b9278ea2c78a28a7.tar.gz
2003-03-11 Andrew Cagney <cagney@redhat.com>
* frame.c (deprecated_update_frame_pc_hack): Don't assume a next frame. Problem found by Corinna Vinschen.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/frame.c18
2 files changed, 17 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index da117699255..26234b84473 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2003-03-11 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (deprecated_update_frame_pc_hack): Don't assume a next
+ frame. Problem found by Corinna Vinschen.
+
2003-03-11 Pierre Muller <muller@ics.u-strasbg.fr>
* doublest.c (floatformat_from_length): Accept also
diff --git a/gdb/frame.c b/gdb/frame.c
index bbe870af0f7..0bef68b2a11 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -1583,12 +1583,18 @@ deprecated_update_frame_pc_hack (struct frame_info *frame, CORE_ADDR pc)
{
/* See comment in "frame.h". */
frame->pc = pc;
- /* While we're at it, update this frame's cached PC value, found in
- the next frame. Oh, for the day when "struct frame_info" is
- opaque and this hack on hack can go. */
- gdb_assert (frame->next != NULL);
- frame->next->pc_unwind_cache = pc;
- frame->next->pc_unwind_cache_p = 1;
+ /* NOTE: cagney/2003-03-11: Some architectures (e.g., Arm) are
+ maintaining a locally allocated frame object. Since such frame's
+ are not in the frame chain, it isn't possible to assume that the
+ frame has a next. Sigh. */
+ if (frame->next != NULL)
+ {
+ /* While we're at it, update this frame's cached PC value, found
+ in the next frame. Oh for the day when "struct frame_info"
+ is opaque and this hack on hack can just go away. */
+ frame->next->pc_unwind_cache = pc;
+ frame->next->pc_unwind_cache_p = 1;
+ }
}
void