This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: GDB on FreeBSD/Alpha
- To: Mark Kettenis <kettenis at wins dot uva dot nl>
- Subject: Re: GDB on FreeBSD/Alpha
- From: Anatoly Vorobey <mellon at pobox dot com>
- Date: Mon, 29 May 2000 19:25:10 -0400
- Cc: obrien at FreeBSD dot ORG, gdb at sourceware dot cygnus dot com
- References: <200005292310.e4TNAoY05799@delius.kettenis.local>
You, Mark Kettenis, were spotted writing this on Tue, May 30, 2000 at 01:09:45AM +0200:
>
> -g This generates stabs-in-ecoff debugging information (which is
> embedded in an .mdebug section in ELF). GDB's support for
> this particular format has suffered from some bit rot, but it
> isn't too difficult fix. The code is also used on MIPS, so I
> guess this would be appreciate by a some other people too.
> Looking through the code, there are several places where
> stabs-in-ecoff is commented on as being a (temporary) hack.
Unless I'm mistaken, gcc doesn't know anything about ecoff -- it just
outputs stabs. gas is the program which makes the decision to use
stabs-in-ecoff. Please correct me if I'm wrong.
I'm not at all an expert on Alpha, hence the following question might
be silly, but -- is it possible for gcc/gas on FreeBSD/Alpha to generate
true stabs (i.e. .stab and .stabstr sections) instead of stabs-in-ecoff?
What would be wrong with this?
> A bigger problem is that GCC 2.95.2 doesn't output the right
> stabs for function arguments (and perhaps for local variables
> under some special circumstances). This makes debugging
> really painful, since function arguments will most likely have
> the wrong values in GDB. The GCC bug is fixed in the
> development tree.
I understand that David is going to give us gcc 2.96 on FreeBSD soon.
Is the bug fixed there?
> In the long run I'd advice FreeBSD/Alpha to standardize in DWARF 2,
> since it is used on more platforms.
I would argue against this. Wouldn't it be better for FreeBSD/Alpha
to stay with stabs, in particular to maintain uniformity with FreeBSD/i386?
I admit I have a private interest in staying with stabs too -- I have
my own pet project which is kernel debugger support for stabs in FreeBSD,
in a working shape on i386 now. I'm not too thrilled about adding DWARF2
support there as well and bloating it out of bounds; till now I thought
I'd only need to recover stabs from stabs-in-ecoff on Alpha.
What are the advantages of DWARF2 versus stabs?
--
Anatoly Vorobey,
mellon@pobox.com http://pobox.com/~mellon/
"Angels can fly because they take themselves lightly" - G.K.Chesterton