Mail Archives: djgpp/2001/04/27/05:51:28
On 27 Apr 2001, at 9:23, Eli Zaretskii wrote:
> > From: "Mark E." <snowball3 AT bigfoot DOT com>
> > Date: Thu, 26 Apr 2001 13:01:10 -0400
> >
> > GCC 3.0 when released will produce DWARF2 debug info with the '-gdwarf-2'
> > switch. The next version of GDB for DJGPP will presumably support DWARF2.
>
> DWARF2 should already be supported by GDB; I don't have any
> DJGPP-specific items on my todo regarding DWARF2.
>
> There's work under way by the GDB maintainers (not specific to the
> DJGPP port) to enhance GDB's support of non-trivial C++ code with
> DWARF2 debug info, but the basic support should already be there. For
> example, you should be able to compile a C program with -O3 and be
> able to step through inlined functions and examine register variables
> without any problems we are used to with COFF and stabs.
>
> If you can build a program with -gdwarf-2, please try debugging it.
> If that doesn't work, please tell the details, so any problems could
> be debugged and fixed for the next GDB release.
Tried ...
C:\DJGPP\test>redir -eo gcc -gdwarf-2 -v hello.c -o hello.exe >hello.lst
C:\DJGPP\test>gdbdev hello.exe
GNU gdb 20010417
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-pc-msdosdjgpp"...
(gdb) tb main
Breakpoint 1 at 0x1676
(gdb) r
Starting program: c:/djgpp/test/hello.exe
0x00001676 in main ()
(gdb) where
#0 0x00001676 in main ()
#1 0x00002f6c in __crt1_startup ()
(gdb) l
1 frame-dwarf2.c: No such file or directory (ENOENT).
in frame-dwarf2.c
(gdb)
Andris
---------------------------------------------------------------------------------------------
Reading specs from C:/DJGPP/BIN2/../lib/gcc-lib/djgpp/3.0/specs
Configured with: ../gcc/configure --prefix=/dev/env/DJDIR --build=i686-pc-linux-gnu --host=i586-pc-msdosdjgpp --target=i586-pc-msdosdjgpp --enable-version-specific-runtime-libs
gcc version 3.0 20010425 (prerelease)
C:/DJGPP/BIN2/../lib/gcc-lib/djgpp/3.0/cc1.exe -lang-c -v -iprefix C:\DJGPP\BIN2/../lib/gcc-lib/djgpp/3.0/ -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=0 -D__MSDOS__ -D__MSDOS__ -Asystem=msdos -D__STDC_HOSTED__=1 -remap -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i586
__ -D__tune_pentium__ -imacros C:/DJGPP/BIN2/../lib/gcc-lib/djgpp/3.0/../../../../include/sys/version.h hello.c -quiet -dumpbase hello.c -gdwarf-2 -version -o E:/TMP\ccebCz6i.s
GNU CPP version 3.0 20010425 (prerelease) (cpplib) (80386, BSD syntax)
GNU C version 3.0 20010425 (prerelease) (djgpp)
compiled by GNU C version 3.0 20010425 (prerelease).
#include "..." search starts here:
#include <...> search starts here:
C:/DJGPP/lib/gcc-lib/djgpp/3.0/include
C:/DJGPP/djgpp/include
c:/djgpp/lib/gcc-lib/djgpp/3.0/include
c:/djgpp/djgpp/include
c:/djgpp/include
End of search list.
as -o E:/TMP\ccBpOhrx.o E:/TMP\ccebCz6i.s
C:/DJGPP/BIN2/../lib/gcc-lib/djgpp/3.0/collect2.exe -o hello.exe C:/DJGPP/BIN2/../lib/gcc-lib/djgpp/3.0/../../../crt0.o -LC:/DJGPP/BIN2/../lib/gcc-lib/djgpp/3.0 -LC:/DJGPP/BIN2/../lib/gcc-lib -Lc:/djgpp/lib/gcc-lib/djgpp/3.0 -LC:/DJGPP/BIN2/../lib/gcc-lib/djgpp/3.0/../../.. -Lc:/djgpp/lib/gcc-l
ib/djgpp/3.0/../../.. E:/TMP\ccBpOhrx.o -lgcc -lc -lgcc -Tdjgpp.djl
stubify -v hello.exe
stubify for djgpp V2.X executables, Copyright (C) 1995 DJ Delorie
stubify: hello.exe -> hello.000 -> hello.exe
- Raw text -