[rfc] first cut of solib-som.[ch]

Kevin Buettner kevinb@redhat.com
Wed Dec 8 00:02:00 GMT 2004

On Tue, 7 Dec 2004 15:08:16 -0800
Randolph Chung <randolph@tausq.org> wrote:

> > I'm comfortable with either approach.  It makes a certain amount of
> > sense to initialize the solib related portions of the tdep struct from
> > within a solib-*.c file.  OTOH, it also makes sense to not clutter the
> > solib-*.c file with knowledge of a particular architecture's tdep
> > struct.  In this case, solib-som.c will probably not be used by any
> > other architectures, so it doesn't make much difference.  I'll leave
> > it to you to choose the approach which you like better.
> well, for me it boils down to a dependency problem, which is still a bit
> tricky at the moment.
> what i would like to see is:
> 32-bit hpux targets will build only solib-som.*, and only support 32-bit
> 	debugging
> 64-bit hpux targets will build both solib-som.* and solib-pa64.*, and
> 	support both 32-bit and 64-bit debugging
> the problem in this scenario is that in the common hpux file (i.e.
> hppa-hpux-tdep.c), in order to support both configurations, we cannot
> refer to anything that is in solib-pa64.*.
> this is already a problem if i need to call e.g. pa64_solib_select (),
> and it becomes worse if we expose the solib methods to the tdep file.

Thanks for explaining this.  Given this background, I think that your
original approach of initializing a portion of the tdep struct from
within solib-*.c is preferable.

> i'm thinking that the best way to do this is:
> - have the 32-bit hpux configs define PA_SOM_ONLY (as they do now)
> - unconditionally build both solib-som.c and solib-pa64.c into all hpux
>   targets
> - in solib-pa64.c, make everything compile out if PA_SOM_ONLY is
>   defined, except for a stub pa64_solib_select ()
> is there a cleaner way?

I can't think of one at the moment.  So... go ahead with this approach.


More information about the Gdb-patches mailing list