This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] Infinite backtraces...
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Andrew Cagney <cagney at gnu dot org>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 2 Dec 2004 15:12:55 -0800
- Subject: Re: [RFC] Infinite backtraces...
- References: <20041202224606.GL994@adacore.com>
> I am not sure I have a sufficiently high-level view of the entire
> code that is involved in unwinding, but it seemed to me that we need
> to add a new architecture-dependent hook that would tell whether a
> given frame is the initial one, and that unwinding can not be done
> past this frame. This naturally pointed to a new gdbarch method.
>
> Something like gdbarch_upper_most_frame_p (....), with a default
> value that would always return false.
Something I forgot to add was that I thought about adding a frame
method (in the frame_unwind struct). But I don't this this is the
best approach, as you can have several unwinders active at the same
time for the same target, while the end-of-callstack condition
would remain the same reguardless of the type of unwinding we're
doing.
I am sort of walking on thin ice here, though. I could very well
imagine a case where we would rely on register value in one case,
and a flag from whatever frame information we find in another case.
This is why I'm mentioning this idea here. JIC.
--
Joel