This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Infinite backtraces...


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]