This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Recording of register saves in DWARF2 CFI
- From: Andrew Haley <aph at redhat dot com>
- To: James Molloy <jamesmol at transitive dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 21 Apr 2008 11:45:42 +0100
- Subject: Re: Recording of register saves in DWARF2 CFI
- References: <480C6775.3030804@transitive.com>
James Molloy wrote:
> Hi,
>
> I'm attempting to write a cross-platform debugger for a hobby kernel,
> and as part of which I use DWARF-2's CFI stack unwinding functionality.
>
> This works perfectly, however I would also like to obtain the parameters
> given to each function call on the stack. I can do this easily in x86 as
> all the parameters are passed via stack, however on x64 and MIPS I'm
> having difficulty, as the first X parameters are passed via register.
>
> The DWARF-2 specification makes allowance for this - the CFI system is
> capable of determining the value of any and every register at the start
> of any stack frame - but I have noticed that GCC doesn't record
> unwinding rules for many registers (seemingly any register not essential
> to the finding of the CFA or return address).
>
> Is there any flag available to enable recording of every register, or,
> even better, certain registers, for every stack frame? I've grepped the
> manual to no avail.
Surely this is in the debuginfo, not the unwinder data. Aren't
you looking in the wrong place?
Andrew.