From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7444 invoked by alias); 4 Jun 2004 18:44:34 -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 7437 invoked from network); 4 Jun 2004 18:44:33 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 4 Jun 2004 18:44:33 -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 i54IiWi7006202 for ; Fri, 4 Jun 2004 14:44:33 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i54IiV017960; Fri, 4 Jun 2004 14:44:32 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 340002B9D; Fri, 4 Jun 2004 14:44:28 -0400 (EDT) Message-ID: <40C0C30C.7020308@gnu.org> Date: Fri, 04 Jun 2004 18:44: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 , Eli Zaretskii Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfa] function descriptor handling for push_dummy_call References: <20040604061024.GQ601@tausq.org> In-Reply-To: <20040604061024.GQ601@tausq.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-06/txt/msg00077.txt.bz2 > This is an updated patch to improve function descriptor handling for > push_dummy call. > > This implements the idea discussed in: > > http://sources.redhat.com/ml/gdb-patches/2004-05/msg00093.html > > Instead of passing a dereferenced function value into push_dummy_call (), it > passes the entire "struct value *function". > > There are two parts to this patch, the first bit updates > gdbarch.{sh,h,c} with the new prototype, and updates $(ARCH)-tdep.c. > Instead of adding find_function_addr calls to every instance, I've only > added it where it was needed, and pulled in infcall.h in those cases. > find_function_addr() has been enhanced slightly to handle a NULL return > type pointer being passed in. (BTW, here are sort of three parts: the gdbarch change; the corresponding doco update (changelog goes in doco/ChangeLog); and the hp/ux tweak.) I'm ok with the gdbarch and hp/ux mods (suggest separate commits?). I'd just first check that Eli is ok with the doco aspect of the gdbint.texinfo change. enjoy, Andrew > * doc/gdbint.texinfo: Update documentation for push_dummy_call. > * infcall.c (call_function_by_hand): Pass entire function value > to push_dummy_call. > > * Makefile.in (alpha-tdep.o, frv-tdep.o, ia64-tdep.o, mips-tdep.o) > (ppc-sysv-tdep.o, rs6000-tdep.o): Update dependencies. > * alpha-tdep.c (alpha_push_dummy_call): Update call signature. > * amd64-tdep.c (amd64_push_dummy_call): Likewise. > * arm-tdep.c (arm_push_dummy_call): Likewise. > * avr-tdep.c (avr_push_dummy_call): Likewise. > * cris-tdep.c (cris_push_dummy_call): Likewise. > * d10v-tdep.c (d10v_push_dummy_call): Likewise. > * frv-tdep.c (frv_push_dummy_call): Likewise. > * h8300-tdep.c (h8300_push_dummy_call): Likewise. > * hppa-tdep.c (hppa32_push_dummy_call) > (hppa64_push_dummy_call): Likewise. > * i386-tdep.c (i386_push_dummy_call): Likewise. > * ia64-tdep.c (ia64_push_dummy_call): Likewise. > * m32r-tdep.c (m32r_push_dummy_call): Likewise. > * m68hc11-tdep.c (m68hc11_push_dummy_call): Likewise. > * m68k-tdep.c (m68k_push_dummy_call): Likewise. > * m88k-tdep.c (m88k_push_dummy_call): Likewise. > * mips-tdep.c (mips_eabi_push_dummy_call, mips_n32n64_push_dummy_call) > (mips_o32_push_dummy_call, mips_o64_push_dummy_call): Likewise. > * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call) > (ppc64_sysv_abi_push_dummy_call): Likewise. > * ppc-tdep.h (ppc_sysv_abi_push_dummy_call) > (ppc64_sysv_abi_push_dummy_call): Likewise. > * rs6000-tdep.c (rs6000_push_dummy_call): Likewise. > * s390-tdep.c (s390_push_dummy_call): Likewise. > * sh-tdep.c (sh_push_dummy_call_fpu) > (sh_push_dummy_call_nofpu): Likewise. > * sparc-tdep.c (sparc32_push_dummy_call): Likewise. > * sparc64-tdep.c (sparc64_push_dummy_call): Likewise. > * vax-tdep.c (vax_push_dummy_call): Likewise. > .... > 2004-06-03 Randolph Chung > > * hppa-tdep.h (struct value): Forward declaration. > (gdbarch_tdep): Define tdep find_global_pointer method. > * hppa-tdep.c (hppa32_push_dummy_call): Find the global pointer > associated with the function we are trying to call, and write it > to the gp register. > (hppa32_convert_from_funct_ptr_addr): New function. > (hppa_find_global_pointer): New function. > (hppa_gdbarch_init): Set default find_global_pointer method; set > convert_from_func_ptr_addr method. > * hppa-linux-tdep.c (hppa_linux_find_global_pointer): New function. > (hppa_linux_init_abi): Set find_global_pointer method. > * Makefile.in (hppa-linux-tdep.o): Add value.h dependency. > > Index: Makefile.i