This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: frame->unwind->this_base()
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Sun, 16 Mar 2003 17:10:08 -0500
- Subject: Re: frame->unwind->this_base()
- References: <3E74F4F4.50003@redhat.com>
On Sun, Mar 16, 2003 at 05:04:36PM -0500, Andrew Cagney wrote:
> At present there is a per-frame ID method since different frames
> determine their ID using different techniques. The ID (which identifies
> a given frame instance) includes a base and pc/func value.
>
> GDB's frame code also makes available the get_frame_base() method.
> While the default implementation returns get_frame_id().base, I think
> there is going to need to be a per-frame frame->unwind->this_base method.
>
> For dwarf2 frames, it would return, DW_AT_frame_base. For prologue
> frames, it would return an attempt at an equivalent value. Hopefully it
> wouldn't be called for other frame types :-).
>
> It might even be reasonable for a prologue based unwinder to error out
> when asked for the frame's base before the stack frame has been created.
>
> Thoughts?
>
> I should note that dwarf2expr.c contains code that tries to
> locally/directly evaluate the frame base. I think that should instead
> do a get_frame_base() call.
There's no guarantee right now that the DW_AT_frame_base agrees with
the frame's base. I don't even think it's necessary that they be the
same.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer