aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-01-05 20:33:35 +0000
committerMark Kettenis <kettenis@gnu.org>2004-01-05 20:33:35 +0000
commitdbc22fa117a217df10f09ade0649a0ba95c5b44e (patch)
tree9f1081b94150a0deb44867d7cf37d6d4a9da8a9b /gdb
parent5439edaaeadfbbcb50120c72dd9febfefb4e355f (diff)
downloadgdb-dbc22fa117a217df10f09ade0649a0ba95c5b44e.zip
gdb-dbc22fa117a217df10f09ade0649a0ba95c5b44e.tar.gz
gdb-dbc22fa117a217df10f09ade0649a0ba95c5b44e.tar.bz2
* frame.c (get_prev_frame): Don't try to unwind the PC. This
fixes PR backtrace/1476.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/frame.c31
2 files changed, 5 insertions, 31 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4be6d62..0e5ef29 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-05 Mark Kettenis <kettenis@gnu.org>
+
+ * frame.c (get_prev_frame): Don't try to unwind the PC. This
+ fixes PR backtrace/1476.
+
2004-01-05 Andrew Cagney <cagney@redhat.com>
* libunwind-frame.h (struct frame_id): Add opaque declaration,
diff --git a/gdb/frame.c b/gdb/frame.c
index 1d37891..b8a7b25 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -1943,37 +1943,6 @@ get_prev_frame (struct frame_info *this_frame)
prev_frame = FRAME_OBSTACK_ZALLOC (struct frame_info);
prev_frame->level = this_frame->level + 1;
- /* Try to unwind the PC. If that doesn't work, assume we've reached
- the oldest frame and simply return. Is there a better sentinal
- value? The unwound PC value is then used to initialize the new
- previous frame's type.
-
- Note that the pc-unwind is intentionally performed before the
- frame chain. This is ok since, for old targets, both
- frame_pc_unwind (nee, FRAME_SAVED_PC) and
- DEPRECATED_FRAME_CHAIN()) assume THIS_FRAME's data structures
- have already been initialized (using
- DEPRECATED_INIT_EXTRA_FRAME_INFO) and hence the call order
- doesn't matter.
-
- By unwinding the PC first, it becomes possible to, in the case of
- a dummy frame, avoid also unwinding the frame ID. This is
- because (well ignoring the PPC) a dummy frame can be located
- using THIS_FRAME's frame ID. */
-
- if (frame_pc_unwind (this_frame) == 0)
- {
- /* The allocated PREV_FRAME will be reclaimed when the frame
- obstack is next purged. */
- if (frame_debug)
- {
- fprintf_unfiltered (gdb_stdlog, "-> ");
- fprint_frame (gdb_stdlog, NULL);
- fprintf_unfiltered (gdb_stdlog, " // unwound PC zero }\n");
- }
- return NULL;
- }
-
/* Don't yet compute ->unwind (and hence ->type). It is computed
on-demand in get_frame_type, frame_register_unwind, and
get_frame_id. */