Mail Archives: djgpp-workers/2002/02/05/10:26:28
On 4 Feb 2002 at 21:28, Eli Zaretskii wrote:
> > 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?
I got similar trouble. Didn't saw similar problems when tried the same
with gcc-3.0.3 Linux-to-DJGPP cross-compiler. Perhaps the trouble
is related to use of static object libraries without 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).
I'm using now for most stuff (it may change when I'll run some scripts
under Linux to cross-build newer CVS snapshot):
D:\>as --version
GNU assembler 2.11.93 20020128
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
This assembler was configured for a target of `i586-pc-msdosdjgpp'.
(2.11.2 is still used for building DJGPP binaries of GCC-3.X)
Andris
- Raw text -