This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Debugging with stabs on Solaris x86 with GCC and the native as
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gcc at gcc dot gnu dot org, gdb at sources dot redhat dot com
- Cc: brobecker at gnat dot com
- Date: Mon, 15 Dec 2003 22:40:08 +0100 (CET)
- Subject: Debugging with stabs on Solaris x86 with GCC and the native as
[ Joel, I came across a message from you about the same problem from 2002 ]
When running the GDB testsuite on i386-pc-solaris2.9 I noticed that
GDB had some trouble locating static variables. Turns out the native
x86 Solaris assembler doesn't emit relocations for stabs describing
these variables. As a result the unrelocated value ends up in the
final executable, which simply doesn't point at the right location for
the variable. It is needless to say that this makes debugging, well,
a challenge.
On SPARC everything seems to be all-right since the assembler *does*
emit the necessary relocations.
Possible solutions:
* Use GNU as.
* Let GCC emit a few extra symbols as described in:
http://sources.redhat.com/gdb/current/onlinedocs/stabs_13.html#SEC89
* Make GCC emit DWARF2 debugging info on i386-pc-solaris2.9 by default.
Mark