From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1188 invoked by alias); 28 Oct 2003 21:55:23 -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 1181 invoked from network); 28 Oct 2003 21:55:22 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 28 Oct 2003 21:55:22 -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 h9SLtLM22609 for ; Tue, 28 Oct 2003 16:55:21 -0500 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 h9SLtL611511 for ; Tue, 28 Oct 2003 16:55:21 -0500 Received: from localhost.localdomain (vpn50-2.rdu.redhat.com [172.16.50.2]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id h9SLtLju002128; Tue, 28 Oct 2003 16:55:21 -0500 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h9SLtFa03718; Tue, 28 Oct 2003 14:55:15 -0700 Date: Tue, 28 Oct 2003 21:55:00 -0000 From: Kevin Buettner Message-Id: <1031028215515.ZM3717@localhost.localdomain> In-Reply-To: Andrew Cagney "[rfa:solib] Handle start-address descriptors" (Oct 27, 1:45pm) References: <3F9D67D7.2090003@redhat.com> To: Andrew Cagney , gdb-patches@sources.redhat.com Subject: Re: [rfa:solib] Handle start-address descriptors MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-10/txt/msg00818.txt.bz2 On Oct 27, 1:45pm, Andrew Cagney wrote: > Index: solib-svr4.c ... > +#include "bfd-target.h" > +#include "exec.h" I'm surprised that you needed to include exec.h. solib-svr4.c already includes target.h and I would've thought this to be sufficient. If exec.h isn't needed, please take it out. (Don't forget to fix Makefile.in.) > +/* Given an executable's ABFD and target, compute the entry-point > + address. */ > + > +static CORE_ADDR > +exec_entry_point (struct bfd *abfd, struct target_ops *targ) > +{ Could you add a comment here telling why gdbarch_convert_from_func_ptr_addr() is needed. Maybe something like this? /* For most targets, the address returned by bfd_get_start_address() is the entry point for the start function. But, for some targets, bfd_get_start_address() returns the address of a function descriptor from which the entry point address may be extracted. This address is extracted by gdbarch_convert_from_func_ptr_addr(). The method gdbarch_convert_from_func_ptr_addr() is the merely the identify function for targets which don't use function descriptors. */ Hmm, a possible problem... What happens when the target uses function descriptors, but not for the exec file's start address? I'm wondering (ugh) if a separate gdbarch method is required for obtaining the start address. > + return gdbarch_convert_from_func_ptr_addr (current_gdbarch, > + bfd_get_start_address (abfd), > + targ); > +} Kevin