Mail Archives: djgpp-workers/2002/02/04/14:30:58
> From: Martin Stromberg <Martin DOT Stromberg AT epl DOT ericsson DOT se>
> Date: Mon, 4 Feb 2002 16:14:30 +0100 (MET)
>
> I compiled with "gcc -g -O2 c.c -o c" and then use gdb 4.18:
>
> (gdb) br main
> Breakpoint 1, main () at c.c:233
> (gdb) r
> Starting program: <some path>/c
>
> Breakpoint 1, main () at c.c:233
> Line number 233 out of range; c.c has 9 lines.
This is the same bug I reported several months ago; I don't think
anyone has replied. I don't have GCC 3.0.3 installed yet, but I
tried with GCC 3.0.2, and I see the same problem with all versions of
GDB, including the latest and greatest 5.1.1.
Andris, did you try Martin's example with GCC 3.0.3 and GDB 5.1.1,
and didn't see the problem with COFF debug info?
Try "objdump --debugging c.exe", and you will see a lot og bogus line
numbers there. So the problem is not in GDB, but either in GCC or in
Binutils.
> My gcc 3.03 is dated Jan 29 18:20.
>
> "gcc -gstabs -O2 c.c -o c" works fine.
Right, same here with GDB 5.1 and 5.1.1.
> "gcc -ggdb -O2 c.c -o c" or "gcc -gdwarf-2 -O2 c.c -o c" results in:
>
> c:/temp\ccyuGCSP.s: Assembler messages:
> c:/temp\ccyuGCSP.s:2: Warning: Missing string
> c:/temp\ccyuGCSP.s:2: Error: Rest of line ignored. First ignored character is `1'.
This does work for me, so I think Andris is right: your Binutils need
to be updated (I have the latest upload of 2.11.2 from SimTel).
- Raw text -