From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2692 invoked by alias); 22 Jan 2006 20:43:09 -0000 Received: (qmail 2678 invoked by uid 22791); 22 Jan 2006 20:43:08 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sun, 22 Jan 2006 20:43:06 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F0m3E-0007fN-Oh for gdb-patches@sourceware.org; Sun, 22 Jan 2006 15:43:04 -0500 Date: Sun, 22 Jan 2006 20:43:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: How to implement gcore on pa-hpux ? Message-ID: <20060122204304.GE27224@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <20060104174009.GC1868@adacore.com> <20060104184050.GA8927@nevyn.them.org> <43BC1DFF.2080501@redhat.com> <20060105032232.GB4734@adacore.com> <43BDF489.1080600@redhat.com> <20060106102824.GQ4734@adacore.com> <20060106134330.GA4796@nevyn.them.org> <20060109055848.GB878@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060109055848.GB878@adacore.com> User-Agent: Mutt/1.5.8i 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/msg00307.txt.bz2 On Mon, Jan 09, 2006 at 09:58:48AM +0400, Joel Brobecker wrote: > > On Fri, Jan 06, 2006 at 02:28:24PM +0400, Joel Brobecker wrote: > > > 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? > > > > I think that if you need to add new files and rely on magic function > > names, then you're already past the time when you needed to add things > > to a vector. > > Magic function name? Ouch, my heart ;-). > > OK, will try to play with the target vector. For the record, here is > what I had in mind. I implemented it because it's not that far off the > road to using the target vector. In this case, it's the gcore module > itself that holds the method pointer rather than the target vector. > It's not as powerful, because it is not dynamic the way target vectors > are, but it's not worse than before. Thanks. FYI, this patch is a perfect example of why I want you to use the target vector instead: > @@ -1156,5 +1195,6 @@ _initialize_inf_ttrace (void) > { > #ifdef HAVE_TTRACE > inf_ttrace_page_dict.pagesize = getpagesize(); > + gcore_set_write_core (inf_ttrace_write_core); > #endif > } inf_ttrace_write_core is only going to work when debugging using ttrace. Just because it's an HP/UX system doesn't mean we aren't connected to some non-native target. -- Daniel Jacobowitz CodeSourcery