public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Debugging with stabs on Solaris x86 with GCC and the native as
@ 2003-12-15 21:40 Mark Kettenis
  0 siblings, 0 replies; only message in thread
From: Mark Kettenis @ 2003-12-15 21:40 UTC (permalink / raw)
  To: gcc, gdb; +Cc: brobecker

[ 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-12-15 21:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-15 21:40 Debugging with stabs on Solaris x86 with GCC and the native as Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).