[bug report] gcc-2.95.1 on Solaris x86 2.5 [patch for 2.95.2]

Alexandre Oliva oliva@lsd.ic.unicamp.br
Sat Sep 18 00:34:00 GMT 1999


On Sep 17, 1999, I Lee Hetherington <ilh@sls.lcs.mit.edu> wrote:

> Also, debugging, even with gdb, seems to work better with dwarf2 for me
> on Solaris 2.5 x86.  gdb doesn't find the source files if I use -gstabs,
> but does with -gdwarf-2, when I run in a directory different from
> compilation.

Well, we should probably default to -gstabs, as we do on
Solaris/sparc, so that dbx works.  People can always --enable-dwarf2
or compile -gdwarf-2 if they wish (unlike --with-stabs, that relied
upon sol2dbg.h that was plain broken with GNU as, despite the comment
in the beginning of the header file!)


Here's a patch that enables stabs by default on Solaris/x86, and works
around the lack of support for `-s' in gas.  Ok to install?

I strongly advise to put it in for 2.95.2.  We've been getting several
reports of crashes in dwarfout_finish, when compiling with `g++ -g' or
`gcj' without `-g0' (it defaults to -g1).  This patch obviously won't
fixing the -gdwarf bug, as it would be desirable, but that is
currently beyond my (avail)abilities.  Moreover, using stabs by
default on Solaris/x86 is consistent with Solaris/sparc behavior.



More information about the Gcc-bugs mailing list