This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch/rfa] function descriptor handling for push_dummy_call


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 <tausq@debian.org>

	* 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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]