From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15439 invoked by alias); 29 Apr 2004 16:48:50 -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 15432 invoked from network); 29 Apr 2004 16:48:49 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 29 Apr 2004 16:48:49 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i3TGmnKI024320 for ; Thu, 29 Apr 2004 12:48:49 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i3TGmmv16311; Thu, 29 Apr 2004 12:48:48 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 9EDF52B9D; Thu, 29 Apr 2004 12:48:50 -0400 (EDT) Message-ID: <409131F2.5040706@gnu.org> Date: Thu, 29 Apr 2004 16:48:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Randolph Chung Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc/hppa] handle setting gp for calling shlib functions References: <20040429062324.GX3965@tausq.org> <40910D4F.1020700@gnu.org> <20040429150704.GZ3965@tausq.org> <409126FD.3080708@gnu.org> <20040429161357.GA3965@tausq.org> In-Reply-To: <20040429161357.GA3965@tausq.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00683.txt.bz2 >>>Unfortunately the func_addr that is passed >>>> >into push_dummy_call is already the canonicalized function address, >>>> >so i cannot do this as part of e.g. find_global_pointer. >> >>> >>> For PPC64 I used ABI knowledge to do a code address -> descriptor >>> address reverse lookup. Can you do something similar? > > > you mean look through a opd section? unfortunately there isn't such a > thing for the 32-bit abi. it's there in hppa64. Anything. For pa64, given "", the descriptor is at "." so the operation is pretty easy. > for hppa32, the plabel likely resides in the got/plt, and i don't think > we can easily find it there. > > >>> Anyway, a thing-to-do-one day is to pass the function's ``value'' >>> (descriptor and type) to push-dummy-call (there has been talk of doing >>> this before). Another is to clean up what's passed as the parameter >>> list -> again descriptors. > > > well, i can already do this, by *not* implementing the conversion > function. However, when the actual call is made, we need to do the > conversion. > > how about adding a new gdbarch method breakpoint_from_func_ptr > and potentially not calling convert_from_func_ptr_address() from > call_function_by_hand()? other than ia64, ppc64 and hppa, how many > function-descriptor archs do we have? (also xstormy16 at least) The function/variable is (well was, it appears to have fallen off the radar for the moment) also wanted for a second reason. When it comes to implementing ABI variants the full function type info is needed. Hence, a ``struct value'' function descriptor (or descriptor pointer / type) are going to eventually be needed anyway. Hence, I think an updated push-dummy-call with the new parameter would be better. Andrew