From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30367 invoked by alias); 4 Jan 2006 19:12:38 -0000 Received: (qmail 30360 invoked by uid 22791); 4 Jan 2006 19:12:38 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 04 Jan 2006 19:12:36 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id k04JCXDu007598 for ; Wed, 4 Jan 2006 14:12:33 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id k04JCW111114; Wed, 4 Jan 2006 14:12:32 -0500 Received: from [172.16.24.50] (bluegiant.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id k04JCTib029963; Wed, 4 Jan 2006 14:12:29 -0500 Message-ID: <43BC1DFF.2080501@redhat.com> Date: Wed, 04 Jan 2006 19:12:00 -0000 From: Michael Snyder User-Agent: Mozilla Thunderbird (X11/20050322) MIME-Version: 1.0 To: Daniel Jacobowitz CC: Joel Brobecker , gdb-patches@sources.redhat.com Subject: Re: How to implement gcore on pa-hpux ? References: <20060104174009.GC1868@adacore.com> <20060104184050.GA8927@nevyn.them.org> In-Reply-To: <20060104184050.GA8927@nevyn.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00046.txt.bz2 Daniel Jacobowitz wrote: > 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. Alternatively... The "gcore" command is actually defined in gcore.c. If someone (hpux) wanted to define it differently, it should be as simple as linking in your own (eg.) hpux-gcore.c module, *instead of* the generic gcore.c module. Current targets that implement gcore in the generic way do so by adding gcore.o to the NATDEPFILES.