This is the mail archive of the
mailing list for the GCC project.
Re: [debug/13267] proposed patch to dwarf2out.c
> This implies that the other debug info formats are also broken, e.g.
> dbxout.c and sdbout.c, as they both only do big-endian corrections for
> PARM_DECL. So we need fixes for all of them.
> That begs the question of why suddenly we have trouble with
> register-declared VAR_DECLs in all debug info formats. Maybe it is the
> VAR_DECL that is wrong? I just tried with a mips 3.5 toolchain and a
> arm 3.3 toolchain, and neither one shows the problem on your testcase.
I can see the same problems on mips 3.5. To reproduce, compile the
testcase with "./cc1 -gdwarf-2 -mel bug2.c -o bug2-el.s". Repeat
with -meb and bug2-eb.s. Note that both outputs store the variable
to the stack the same way:
However there is NO difference in the dwarf2 information (a diff of
the two .s files shows them to be identical). Both show the QI
variable to be at offset 16 from $fp, even though for big endian it's
at offset 19.
-gstabs+ shows the same behavior.
Note: One of my earlier thoughts was that the debug info should be
telling gdb that the size of the variable has changed from 8 bits to
32, but Fred argued that that was not something that was supposed to