Mail Archives: djgpp-workers/2001/07/28/05:27:29
The same program I posted in the previous message seems to indicate
that there's a discrepancy between the register numbering used by GCC
and the one used by GDB (the latter is supposed to be derived from the
x86 ABI, so it's probably GCC which is in error).
To see this, compile with -gstabs+ (to work around the possible bug I
reported earlier), and then type this:
gdb ftest.exe
(gdb) break 10
Breakpoint 1 at 0x15fe: file ftest.c, line 10.
(gdb) run
Starting program: ftest.exe
Breakpoint 1, main () at ftest.c:10
10 printf ("%f\n", d);
(gdb) info address d
Symbol "d" is a variable in register ds.
In fact, the variable is in st(0) (it's a double), but the output of
"objdump --debugging" clearly shows that the register number is
recorded as 0xc, which is DS (st(0) is 0x10).
I verified that this happens not only with -gstabs+ by compiling the
program on another machine, where I have GCC 2.7.2.1 and Binutils
2.11.2: the same problem happens with COFF debug info.
Can someone please look into GCC sources and see what register
numbering does it use for DJGPP, and whether that numbering is
different from other x86 targets?
- Raw text -