From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12219 invoked by alias); 11 Jun 2003 23:11:12 -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 12185 invoked from network); 11 Jun 2003 23:11:11 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 11 Jun 2003 23:11:11 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h5BNBBH12853 for ; Wed, 11 Jun 2003 19:11:11 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h5BNBBI16307 for ; Wed, 11 Jun 2003 19:11:11 -0400 Received: from localhost.localdomain (vpn50-31.rdu.redhat.com [172.16.50.31]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h5BNBAE23337; Wed, 11 Jun 2003 19:11:11 -0400 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h5BNB5E27288; Wed, 11 Jun 2003 16:11:05 -0700 Date: Wed, 11 Jun 2003 23:11:00 -0000 From: Kevin Buettner Message-Id: <1030611231105.ZM27287@localhost.localdomain> In-Reply-To: Jim Blandy "[ppc64-linux] gdbarch hook to find true execution entry point" (Jun 11, 8:22am) References: To: Jim Blandy , gdb-patches@sources.redhat.com Subject: Re: [ppc64-linux] gdbarch hook to find true execution entry point MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-06/txt/msg00397.txt.bz2 On Jun 11, 8:22am, Jim Blandy wrote: > Subject: [ppc64-linux] gdbarch hook to find true execution entry point > > 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. > [...] > Index: gdb/solib-svr4.c > =================================================================== > RCS file: /cvs/src/src/gdb/solib-svr4.c,v > retrieving revision 1.32.8.2 > diff -c -r1.32.8.2 solib-svr4.c > *** gdb/solib-svr4.c 11 Jun 2003 13:00:34 -0000 1.32.8.2 > --- gdb/solib-svr4.c 11 Jun 2003 13:16:32 -0000 > *************** > *** 1022,1028 **** > the current pc (which should point at the entry point for the > dynamic linker) and subtracting the offset of the entry point. */ > if (!load_addr_found) > ! load_addr = read_pc () - tmp_bfd->start_address; > > /* Record the relocated start and end address of the dynamic linker > text and plt section for svr4_in_dynsym_resolve_code. */ > --- 1022,1029 ---- > the current pc (which should point at the entry point for the > dynamic linker) and subtracting the offset of the entry point. */ > if (!load_addr_found) > ! load_addr = (read_pc () > ! - generic_bfd_entry_point (current_gdbarch, tmp_bfd)); > > /* Record the relocated start and end address of the dynamic linker > text and plt section for svr4_in_dynsym_resolve_code. */ Shouldn't enable_break() in solib-svr4.c be calling gdbarch_bfd_entry_point()? What cases do you know of where calling bfd_get_start_address() is insufficient for finding the start address? I'm wondering if we need a gdbarch hook at all... Kevin