From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25427 invoked by alias); 12 Jun 2003 20:59:39 -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 13320 invoked from network); 12 Jun 2003 20:54:29 -0000 Received: from unknown (HELO zenia.home) (12.223.225.216) by sources.redhat.com with SMTP; 12 Jun 2003 20:54:29 -0000 Received: by zenia.home (Postfix, from userid 5433) id D062620D85; Thu, 12 Jun 2003 15:54:37 -0500 (EST) To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [ppc64-linux] gdbarch hook to find true execution entry point References: <3EE72E0F.4010607@redhat.com> From: Jim Blandy Date: Thu, 12 Jun 2003 20:59:00 -0000 In-Reply-To: <3EE72E0F.4010607@redhat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-06/txt/msg00427.txt.bz2 Andrew Cagney writes: > > 2003-06-11 Jim Blandy > > * gdbarch.sh (gdbarch_bfd_entry_point): New gdbarch method. > > * arch-utils.c (generic_bfd_entry_point): New function. > > * arch-utils.h (generic_bfd_entry_point): New declaration. > > * gdbarch.c, gdbarch.h: Regenerated. > > * solib-svr4.c (enable_break): Call it, instead of accessing > > tmp_bfd->start_address directly. > > > I think this should be in BFD. Not just GDB but also the simulators > are going to need this information. Not sure I agree. The interesting information for process startup is intrinsically ABI-specific; for PPC64 Linux it's the TOC and environment pointers, but for another target it might be something else. You need ABI-specific code on the consumer's side anyway, just to know, for example, which registers everything goes in, so as long as that's there anyway, why not let BFD stick to what it does best --- interpreting object files? In general, the code in GDB supporting an ABI needs to be able to provide its own code to interpret what comes out of BFD. This is just one case that wasn't covered --- thus the gdbarch method.