This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFD] objfiles.h, symfile.c, mdebugread.c: Fixes for Digital Unix.


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]