This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Convert CONVERT_FROM_FUNC_PTR_ADDR to multi-arch
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [PATCH] Convert CONVERT_FROM_FUNC_PTR_ADDR to multi-arch
- From: "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>
- Date: Thu, 26 Oct 2000 9:49:00 MET DST
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