delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/02/04/14:30:58

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Date: Mon, 04 Feb 2002 21:28:52 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-Id: <3395-Mon04Feb2002212852+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9
In-reply-to: <200202041514.QAA06374@lws256.lu.erisoft.se> (message from Martin
Stromberg on Mon, 4 Feb 2002 16:14:30 +0100 (MET))
Subject: Re: gcc-3.X and GDB
References: <200202041514 DOT QAA06374 AT lws256 DOT lu DOT erisoft DOT se>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019