This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] remove ECOFF
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: Mark Kettenis <mark dot kettenis at xs4all dot nl>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, Stan Shebs <stanshebs at earthlink dot net>, <gdb-patches at sourceware dot org>
- Date: Tue, 20 Aug 2013 17:19:16 +0100
- Subject: Re: [PATCH] remove ECOFF
- References: <1376936369-30712-1-git-send-email-tromey at redhat dot com> <alpine dot DEB dot 1 dot 10 dot 1308191948550 dot 8514 at tp dot orcam dot me dot uk> <87k3jgiege dot fsf at fleche dot redhat dot com> <201308201519 dot r7KFJwIa000280 at glazunov dot sibelius dot xs4all dot nl>
On Tue, 20 Aug 2013, Mark Kettenis wrote:
> > Maciej> The MIPS target wants to use minimal ECOFF debug information
> > Maciej> that is stored in ELF binaries in the so called PDR or Procedure
> > Maciej> Descriptor Record section [1].
> >
> > Maciej> Support for PDR unwinding (mips-mdebug-tdep.[ch]) was removed a
> > Maciej> while ago from GDB sources
> >
> > Maciej> I think this is a serious shortcoming of GDB on the MIPS target and a
> > Maciej> good argument in favour to having this PDR unwinding support.
> >
> > It's fine by me if you want to resurrect all the code. I don't even
> > mind dropping my patch.
> >
> > If you have a way to test the ECOFF code, then great. I'd appreciate it
> > if you could volunteer to test whatever patches modify these readers.
>
> I think Maciej concerns for MIPS pretty much mirror my concerns for
> Alpha. I should be able to test stuff on Alpha, but not in the next
> three weeks.
Following Stan's suggestion I had a look through mips-mdebug-tdep.[ch] we
have and it seems to me its reliance on mdebugread.[ch] is minimal. It
imports the definition of `struct mdebug_extra_func_info' from
mdebugread.h, but otherwise handles .pdr sections itself. So it looks to
me my concern may have been premature.
I think moving the struct definition over to mips-mdebug-tdep.h shouldn't
be a problem and the rest of ECOFF support can go then. I'll see yet if
all this PDR stuff builds and works with your patch applied. I don't have
a real ECOFF target to test with.
On Tue, 20 Aug 2013, Joseph S. Myers wrote:
> Rather than resurrecting this legacy MIPS-specific support, it would seem
> a lot better on Linux to generate .eh_frame by default (as on various
> other architectures) and phase out any remaining PDR generation there.
> For glibc 2.18 the eh_frame CFI information is present in many assembly
> sources and it could be added to the rest.
That may be a long-term plan, however as I've noted, support for ECOFF
function frame annotation in MIPS GAS has been there since forever and has
been extensively documented in MIPS assembly manuals coming from various
sources, and therefore is present in virtually all MIPS assembly code out
there. OTOH CFI information is mostly lacking from handcoded assembly
sources. Therefore while I think adding such CFI information will be
valuable I also think there's value in having PDR unwinding handled as
well.
There are also the bare-iron targets whose users may not necessarily be
happy to have extra .eh_frame data in their binaries.
My understanding of the reason why mips-mdebug-tdep.[ch] were removed in
the first place was the files had never been properly wired into the MIPS
targets we keep supporting and their only users were obsoleted at one
point, making mips-mdebug-tdep.[ch] orphan.
Maciej