2004-12-12 Andrew Cagney * 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. Index: frame.c =================================================================== RCS file: /cvs/src/src/gdb/frame.c,v retrieving revision 1.196 diff -p -u -r1.196 frame.c --- frame.c 8 Dec 2004 01:56:16 -0000 1.196 +++ frame.c 12 Dec 2004 16:23:55 -0000 @@ -1257,6 +1257,18 @@ get_prev_frame (struct frame_info *this_ 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); } Index: hppa-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/hppa-tdep.c,v retrieving revision 1.189 diff -p -u -r1.189 hppa-tdep.c --- hppa-tdep.c 8 Dec 2004 06:12:40 -0000 1.189 +++ hppa-tdep.c 12 Dec 2004 16:23:57 -0000 @@ -2105,9 +2105,6 @@ hppa_stub_frame_unwind_cache (struct fra if (*this_cache) return *this_cache; - if (frame_pc_unwind (next_frame) == 0) - return NULL; - info = FRAME_OBSTACK_ZALLOC (struct hppa_stub_unwind_cache); *this_cache = info; info->saved_regs = trad_frame_alloc_saved_regs (next_frame);