delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2016/04/28/06:43:40

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level:
X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
autolearn=disabled version=3.3.2
Date: Thu, 28 Apr 2016 13:42:08 +0300
Message-Id: <83bn4uxben.fsf@gnu.org>
From: "Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
To: djgpp AT delorie DOT com
Subject: GCC 3.4.6 -gcoff produces executable without line number info
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
Reply-To: djgpp AT delorie DOT com

Back in June last year, Andris reported that using GCC 3.4.6 he was
able to debug simple executables compiled with -gcoff:

> Date: Tue, 30 Jun 2015 13:53:17 +0300
> From: "Andris Pavenis (andris DOT pavenis AT iki DOT fi)" <djgpp AT delorie DOT com>
>
> Did some testing with different GDB versions and gcc-3.4.4 and
> gcc-3.4.6. Compiled mktime test example from other mail
>
> gcc -gcoff mktime_test.c -o mktime_test.exe
>
> Seems that debugging works OK with official DJGPP gdb-7.7.1 and gdb-7.6
> for COFF debugging info at least for small test executable.

I just tried this today, with the latest GCC 3.4.6 and Binutils 2.26
available from the DJGPP site, and it doesn't seem to work.  Here's an
attempt to debug a toy "hello, world" program (note the 3 marked
lines):

  H:\test>gdb ./hello1.exe
  GNU gdb (GDB) 7.7.1
  Copyright (C) 2014 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "--host=i786-pc-msdosdjgpp --target=djgpp".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>.
  Find the GDB manual and other documentation resources online at:
  <http://www.gnu.org/software/gdb/documentation/>.
  For help, type "help".
  Type "apropos word" to search for commands related to "word"...
  Reading symbols from ./hello1.exe...done.
  (gdb) start
  Temporary breakpoint 1 at 0x160c
  Starting program: h:/test/hello1.exe

  Temporary breakpoint 1, 0x0000160c in main ()   <<<<<<<<<<<<<<<<<<<
  (gdb) n
  Single stepping until exit from function main,  <<<<<<<<<<<<<<<<<<<
  which has no line number information.           <<<<<<<<<<<<<<<<<<<
  Hellow, DJGPP world!
  0x0000396c in __crt1_startup ()
  (gdb) q
  A debugging session is active.

	  Inferior 1 [process 42] will be killed.

  Quit anyway? (y or n) y

The problem seems to be in as.exe: as soon as I replace just that
program by the version from Binutils 2.19, the problem seems to
disappear, even though the rest of Binutils are from 2.26.

Could someone please look into this?

(The real issue is debugging Emacs, of course -- that's why I need
support for -gcoff in the first place.)

TIA

- Raw text -


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