[commit] Move zero PC check to frame.c; Was: [RFC] Infinite backtraces...
Andrew Cagney
cagney@gnu.org
Sun Dec 12 16:36:00 GMT 2004
Randolph Chung wrote:
>>I had the same analysis that it should never happen. If Andrew agrees,
>>I would recommend simply putting an assertion instead. Putting a dummy
>>value is not that satisfactory, as you don't know what this is going
>>to be used for.
>
>
> i've committed the following
>
> 2004-12-05 Randolph Chung <tausq@debian.org>
>
> * hppa-tdep.c (hppa_stub_Frame_unwind_cache): Stop unwinding if
> unwinding from a frame with pc == 0.
> (hppa_stub_frame_this_id): Likewise.
> (hppa_stub_frame_prev_register): Only provide real values if the frame
> cache is not NULL.
FYI,
> Index: hppa-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/hppa-tdep.c,v
> retrieving revision 1.185
> diff -u -p -r1.185 hppa-tdep.c
> --- hppa-tdep.c 6 Dec 2004 03:32:26 -0000 1.185
> +++ hppa-tdep.c 8 Dec 2004 01:41:08 -0000
> @@ -2111,17 +2124,21 @@ hppa_stub_frame_unwind_cache (struct fra
> struct gdbarch *gdbarch = get_frame_arch (next_frame);
> struct hppa_stub_unwind_cache *info;
> struct unwind_table_entry *u;
>
> if (*this_cache)
> return *this_cache;
>
> + if (frame_pc_unwind (next_frame) == 0)
> + return NULL;
> +
I've checked in the attached. This test is generic so might as well
live in frame.c (you'll note that I've made the conditions on which it
triggers more robust).
committed,
Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20041212/8c51e10a/attachment.ksh>
More information about the Gdb-patches
mailing list