From: Kevin Buettner <kevinb@redhat.com>
To: Randolph Chung <randolph@tausq.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfc] first cut of solib-som.[ch]
Date: Tue, 07 Dec 2004 22:18:00 -0000 [thread overview]
Message-ID: <20041207150227.5e30b125.kevinb@redhat.com> (raw)
In-Reply-To: <20041207211735.GD6359@tausq.org>
On Tue, 7 Dec 2004 13:17:35 -0800
Randolph Chung <randolph@tausq.org> wrote:
> > > One interesting bit for hpux is that for hppa64-hpux, to support both
> > > 32-bit and 64-bit debugging at the same time, we will need multiarched
> > > solib support as well. My plan is to call either som_solib_select ()
> > > [below] or pa64_solib_select () in the osabi sniffer to set the correct
> > > current_target_so_ops. Is that how it is supposed to work?
> >
> > Yes, this seems reasonable. (At least for the short term; I think Mark
> > is working on something for the long term...)
>
> ok, one more twist...
>
> there are some hpux specific solib methods that are required. i'm
> assuming that these should go into the gdbarch_tdep vector, i.e. i'm
> adding these to the hppa tdep structure:
>
> /* These are solib-dependent methods. They are really HPUX only, but
> we don't have a HPUX-specific tdep vector at the moment. */
> CORE_ADDR (*solib_thread_start_addr) (struct so_list *so);
> CORE_ADDR (*solib_get_got_by_pc) (CORE_ADDR addr);
> CORE_ADDR (*solib_get_solib_by_pc) (CORE_ADDR addr);
So far, so good.
> and these pointers are initizlied by som_solib_select () or
> pa64_solib_select () to the corresponding implementation. this will get
> rid of the PA_SOM_ONLY hack i added some time back to get
> hppa64-hp-hpux11.11 to build...
The other way to do it is to initialize the HPUX specific tdep struct
from the same function which calls som_solib_select() or pa64_solib_select().
That way, you might not have to #include "hppa-tdep.h" in solib-som.c.
> is this ok?
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.
Kevin
next prev parent reply other threads:[~2004-12-07 22:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-07 9:10 Randolph Chung
2004-12-07 17:31 ` Kevin Buettner
2004-12-07 21:41 ` Randolph Chung
2004-12-07 22:18 ` Kevin Buettner [this message]
2004-12-07 23:27 ` Randolph Chung
2004-12-08 0:02 ` Kevin Buettner
2004-12-08 1:44 ` [commit] First cut of SOM and PA64 solib support Randolph Chung
2004-12-08 4:46 ` Kevin Buettner
2004-12-08 5:28 ` Eli Zaretskii
2004-12-08 6:12 ` Randolph Chung
2004-12-08 20:01 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041207150227.5e30b125.kevinb@redhat.com \
--to=kevinb@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=randolph@tausq.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox