This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: How to implement gcore on pa-hpux ?
- From: Daniel Jacobowitz <drow at false dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 4 Jan 2006 13:40:50 -0500
- Subject: Re: How to implement gcore on pa-hpux ?
- References: <20060104174009.GC1868@adacore.com>
On Wed, Jan 04, 2006 at 09:40:09PM +0400, Joel Brobecker wrote:
>
> So I created a new function in infttrace.c. In order to avoid re-writing
> the part of gcore.c that add the command, and handles the arguments of this
> command, I simply hooked the new infttrace directly into the gcore code.
> A bit crude, but it works and it's pretty localized.
>
> For the FSF tree, I'd like to implement this a little better, and it
> seems to me that the core part of this command, the part that actually
> creates the core file, should be a method of some vector. But which
> vector?
>
> The way the gcore command is currently written, it seems that it would
> make sense for it to be part of the target vector. No?
>
> However, in the case of HP/UX, there is a slight complication, because
> the method is only good in the native case...
If you really mean target vector, then this isn't a complication at
all. The native case should have its own target vector already, in
inf-ttrace.c (note the dash in modern sources). Ideally remote targets
could gcore; but there's been no interest in implementing that so far,
so it's not worth concerning ourselves with until someone wants to work
on it.
--
Daniel Jacobowitz
CodeSourcery