From: Joel Brobecker <brobecker@adacore.com>
To: Michael Snyder <msnyder@redhat.com>
Cc: Daniel Jacobowitz <drow@false.org>, gdb-patches@sources.redhat.com
Subject: Re: How to implement gcore on pa-hpux ?
Date: Fri, 06 Jan 2006 10:28:00 -0000 [thread overview]
Message-ID: <20060106102824.GQ4734@adacore.com> (raw)
In-Reply-To: <43BDF489.1080600@redhat.com>
> OK, well, without looking at your code I don't know if this is
> applicable, but I did write the gcore code so as to use callbacks.
> It was intended to be extendable, so that whatever needed to be
> done per-section(segment) could be done by the callbacks, which
> you could supply.
>
> The callbacks supplied are for elf, for instance, which
> is the only object format that I directly addressed, but
> I would hope that callbacks for other formats could be
> made to fit. I was intending, for instance, to implement
> a callback for remote targets that would simply read the
> memory from the remote-writeable sections and copy it into
> a file.
>
> Can this not be made to work for you?
I think I see what you mean, and I now understand the reason for
the callbacks. I suppose I could do the same for HP/UX, but it would
be more work than just relying on ttrace.
The discussion started because I thought it would be a shame to
duplicate a few lines of code. But perhaps there is another way
of dealing with this.
1. Create a new file gcore-elf.c
Move the elf section there.
2. Create a new file gcore-hpux.c
Put the hpux code there
3. Have gcore call a predefined routine, or maybe a hook
specified by the gcore-* module.
It's not as elegant as having a gdbarch or target method, but it's
probably easier to implement. We defer a bit the work that makes this
a method of some vector, but it's not necessary right now. Perhaps
the pragmatic thing to do would be to wait until we need it before
we start worrying about it. Even then, the work is slightly prepared
because we already have the genericity based on the hook.
What do you guys think?
--
Joel
next prev parent reply other threads:[~2006-01-06 10:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-04 17:40 Joel Brobecker
2006-01-04 18:40 ` Daniel Jacobowitz
2006-01-04 19:12 ` Michael Snyder
2006-01-05 3:24 ` Joel Brobecker
2006-01-06 4:40 ` Michael Snyder
2006-01-06 10:28 ` Joel Brobecker [this message]
2006-01-06 13:43 ` Daniel Jacobowitz
2006-01-09 5:59 ` Joel Brobecker
2006-01-22 20:43 ` Daniel Jacobowitz
2006-01-05 4:03 ` Joel Brobecker
2006-01-05 5:02 ` Daniel Jacobowitz
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=20060106102824.GQ4734@adacore.com \
--to=brobecker@adacore.com \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@redhat.com \
/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