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: [patch] Dwarf2 virtual frame pointer


On Sat, Feb 12, 2005 at 01:04:28PM +0000, Nathan Sidwell wrote:
> Mark Kettenis wrote:
> 
> >Almost certainly no.  Replacing `struct frame *next_frame' with
> >`CORE_ADDR pc' is moving backward instead of forward.  Any functions
> >that starts with legacy_ should not be used in generic code like the
> >code in dwarf2-frame.c.
> oh, ok.
> 
> >Can you explains what you're trying to accomplish?
> >
> >If you're trying to use the DWARF CFI for anything else than unwinding
> >the stack, like finding out whether the location of local variables is
> >relative to $sp or $fp then rethink your strategy.  This is not what
> >the DWARF CFI is for.
> 
> ok.  Then how do I find out that information? The compiler (gcc 3.4) is
> emitting DW_OP_fbreg location information for the local variables, should
> it be emitting something else?

DW_OP_fbreg is fine.  It's not relative to the CFA.  It's relative to
the value of DW_AT_frame_base in the containing function.

Recent versions of GCC can emit location lists for DW_AT_frame_base,
making it just about as accurate as the CFA.  I'm not sure when that
was introduced.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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