This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH/i386newframe/RFC] DWARF CFI frame unwinder
Date: Sun, 4 May 2003 23:42:42 -0400
From: Daniel Jacobowitz <drow@mvista.com>
> >+static CORE_ADDR
> >+dwarf_frame_base_address (struct frame_info *next_frame, void
> >**this_cache)
> >+{
> >+ struct dwarf_frame_cache *cache = dwarf_frame_cache (next_frame,
> >this_cache);
> >+
> >+ return cache->cfa;
> >+}
>
> This isn't right.
Probably yes. I think I added this stuff when I was confused about
what exectly was the value printed by "info frame".
> It should return DW_AT_frame_base.
I don't think that it is the job of the DWARF CFI module to provide
that. I probably should simply remove the frame base code from the
DWARF CFI code, and trust the default frame base methods to do
something sane.
> However, since
> dwarf2expr.c doesn't yet use these methods it doesn't [?] really matter.
> Only affects ``info frame''.
I don't think it should.
You mean return DW_AT_frame_base.
The frame's CFA is the basis for identifying the frame and locating
saved registers in the CFI. It is always present when you have CFI.
DW_AT_frame_base is the basis for locating saved variables and locals.
It is generally present when you have DWARF-2 debug info.
The two are not necessarily related.
Indeed, there is no way of referencing the CFA from outside the DWARF
CFI info.
Mark