This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]