[CRIS] dwarf2 frame sniffer problem?

Orjan Friberg orjan.friberg@axis.com
Fri Mar 12 10:23:00 GMT 2004


Daniel Jacobowitz wrote:
> 
> The beauty of using the CFI data is that it _is_ supposed to work in
> the prologue.  It sounds like the CFI is wrong.  Could you post both
> assembly and CFI data for the same testcase?  I don't know CRIS
> assembly but I imagine I can interpret it well enough to see what's
> going on.

I have attached the test program, dissassembly (objdump -d -S) and the 
dwarf2 info (readelf -w).  (Crash course in CRIS assembly, if at all 
needed: r8 holds the frame pointer and srp holds the return address, 
pushed only in non-leaf functions.)

> It also sounds like your DWARF2_REG_TO_REGNUM may need work, if the
> unwinder thinks r16 is the return address column and GDB thinks it's an
> 8-bit register.

Ugh, I had totally missed that (i.e. I don't even have a CRIS-specific 
DWARF2_REG_TO_REGNUM).  Looking at the other targets' implementations I 
don't understand where they got the dwarf2 register mapping from (though 
amd64-tdep.c mentions System V psABI), and the dwarf2 spec says in 
"2.4.2 Register Name Operators" it should be in the architecture's ABI 
spec.  I'll go bug my compiler guy, or go look in gcc myself.

-- 
Orjan Friberg
Axis Communications

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 84 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20040312/2cb3fc05/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: disassembly
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20040312/2cb3fc05/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dwarf2info
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20040312/2cb3fc05/attachment-0001.ksh>


More information about the Gdb-patches mailing list