diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-12-12 16:26:17 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-12-12 16:26:17 +0000 |
commit | 39ee2ff0da5594221eb8fc5789e002a3b14df2f2 (patch) | |
tree | fb1b6ad601398d6f01b6f681912cd16c6bc51722 /gdb/frame.c | |
parent | 91a533d47bb2463f9eac1d541e9ccf4b89bdd216 (diff) | |
download | binutils-39ee2ff0da5594221eb8fc5789e002a3b14df2f2.zip binutils-39ee2ff0da5594221eb8fc5789e002a3b14df2f2.tar.gz binutils-39ee2ff0da5594221eb8fc5789e002a3b14df2f2.tar.bz2 |
2004-12-12 Andrew Cagney <cagney@gnu.org>
* frame.c (get_prev_frame): When unwinding normal frames, check
that the PC isn't zero.
* hppa-tdep.c (hppa_stub_frame_unwind_cache): Delete check for a
zero PC.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r-- | gdb/frame.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/frame.c b/gdb/frame.c index b229730..99ad24d 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -1257,6 +1257,18 @@ get_prev_frame (struct frame_info *this_frame) return NULL; } + /* Assume that the only way to get a zero PC is through something + like a SIGSEGV or a dummy frame, and hence that NORMAL frames + will never unwind a zero PC. */ + if (this_frame->level > 0 + && get_frame_type (this_frame) == NORMAL_FRAME + && get_frame_type (get_next_frame (this_frame)) == NORMAL_FRAME + && get_frame_pc (this_frame) == 0) + { + frame_debug_got_null_frame (gdb_stdlog, this_frame, "zero PC"); + return NULL; + } + return get_prev_frame_1 (this_frame); } |