From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31440 invoked by alias); 23 Oct 2003 02:41:06 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31428 invoked from network); 23 Oct 2003 02:41:06 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 23 Oct 2003 02:41:06 -0000 Received: from drow by nevyn.them.org with local (Exim 4.24 #1 (Debian)) id 1ACVPO-0000iH-0P for ; Wed, 22 Oct 2003 22:41:06 -0400 Date: Thu, 23 Oct 2003 02:41:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] New (!) BFD target Message-ID: <20031023024105.GB2637@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <3F9725D2.3000102@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F9725D2.3000102@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-10/txt/msg00678.txt.bz2 On Wed, Oct 22, 2003 at 08:50:26PM -0400, Andrew Cagney wrote: > Hello, > > The attached adds a really simple BFD "target" and is used: > > bfd = bfd_open.. (...); > targ = target_bfd_reopen (bfd) > ... operation involving targ ... > target_close (targ, 0); > > Looking at solib-svr4, this object makes it possible to change this: > > load_addr = read_pc () - tmp_bfd->start_address; > > into this: > > load_addr = (read_pc () > - gdbarch_convert_from_func_ptr_addr (current_gdbarch, > > bfd_get_start_address (tmp_bfd), > tmp_bfd_target)); > > i.e., pointer conversion is performed using the original executable and > not the running program. Something needed to fix PPC64 needs. > > thoughts? > I'll look to commit this in a few days, I've already said my pieces about "xclose" and adding more mutable members to the target_ops structure in separate messages, so I won't repeat them. However, please explain more clearly why this is necessary - you haven't provided enough context to understand. Also, how does this interact with the "exec" target, whose functionality it seems to duplicate in some ways? There should be an exec target down the stack somewhere, why aren't you using that? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer