This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFD] objfiles.h, symfile.c, mdebugread.c: Fixes for Digital Unix.
- To: "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>, gdb-patches at sourceware dot cygnus dot com
- Subject: Re: [RFD] objfiles.h, symfile.c, mdebugread.c: Fixes for Digital Unix.
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Sun, 5 Nov 2000 23:41:54 -0700
- References: <200011051229.NAA22858@reisser.regent.e-technik.tu-muenchen.de>
On Nov 5, 1:29pm, Peter.Schauer wrote:
> I failed miserably when trying to run the testsuite on Digital Unix, due
> to numerous internal GDB errors with uninitialized section indices.
>
> We could hack symfile.c to account for the `small' sections being present
> on ECOFF systems, or we could try to get it right in mdebugread.c,
> with help from objfiles.h and symfile.c.
>
> Below are patches for both approaches.
> I am not sure if adding to sect_index_* and SECT_OFF_* is the way to go in
> the general version, hiding those in obj_private might be feasible.
>
> Comments, suggestions ?
I like some of approach #2 better.
Approach #1, though shorter, feels fragile to me. Also, it seems that
we could be adding more and more code to symfile.c to deal with other
special cases later on.
In approach #2, I like the fact that you're using the section offset
corresponding to the actual section instead of assuming that, for
example, ANOFFSET (..., SECT_OFF_TEXT) will give it to you.
I also have concerns regarding the new SECT_OFF_* defines. Having
these in place encourages their use, and I think we should be trying
to move away from using the SECT_OFF_* defines at all.
Kevin