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]

[PATCH] Convert CONVERT_FROM_FUNC_PTR_ADDR to multi-arch


Committed.

> I intend to submit a patch for better printing of function pointers on
> RS/6000 targets, which would need more uses of the CONVERT_FROM_FUNC_PTR_ADDR
> macro in c-valprint.c.
> 
> Assuming that I will never get approval to clutter a generic file with more
> ifdefs, the attached patch converts the CONVERT_FROM_FUNC_PTR_ADDR macro into
> a multi-arch runtime call first.
> 
> 	* arch-utils.c, arch-utils.h (default_convert_from_func_ptr_addr):
> 	New function.
> 	* gdbarch.sh (CONVERT_FROM_FUNC_PTR_ADDR):  Add.
> 	* gdbarch.c, gdbarch.h:  Regenerate.
> 	* valops.c (find_function_addr):  Use CONVERT_FROM_FUNC_PTR_ADDR
> 	unconditionally.
> 
> 	* config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR):  Delete
> 	definition.
> 	* config/powerpc/tm-linux.h (CONVERT_FROM_FUNC_PTR_ADDR):  Remove
> 	undef.
> 	* rs6000-tdep.c (rs6000_convert_from_func_ptr_addr):  Fix comment.
> 	(rs6000_gdbarch_init):  Register rs6000_convert_from_func_ptr_addr
> 	if not ELFOSABI_LINUX.
> 

-- 
Peter Schauer			pes@regent.e-technik.tu-muenchen.de

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