diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-10-22 23:54:11 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-10-22 23:54:11 +0000 |
commit | e2d0e7eb0476ade97ed7c00e7a3838609d52d084 (patch) | |
tree | 455a8bf9468a11414a1542bc9b5d76a2f1583200 /gdb/gdbarch.c | |
parent | f1c07ab0ca71fdadc64f2838f87f39784aee5b63 (diff) | |
download | binutils-gdb-e2d0e7eb0476ade97ed7c00e7a3838609d52d084.tar.gz |
2003-10-22 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (convert_from_func_ptr_addr): Convert to a pure
multi-arch method, add "targ" parameter.
(struct target_ops): Declare.
* gdbarch.h, gdbarch.c: Re-generate.
* Makefile.in (c-valprint.o): Update dependencies.
* arch-utils.h: Update copyright.
(convert_from_func_ptr_addr_identity): Declare.
* arch-utils.c (convert_from_func_ptr_addr_identity): New function.
* ia64-tdep.c (ia64_convert_from_func_ptr_addr): Update.
* rs6000-tdep.c (rs6000_convert_from_func_ptr_addr): Upate.
* ppc-linux-tdep.c (ppc64_linux_convert_from_func_ptr_addr): Update.
* infcall.c (find_function_addr, call_function_by_hand): Update.
* c-valprint.c: Include "target.h".
(print_function_pointer_address): Update.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 1983421d0f3..8198bb0d6c2 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -418,7 +418,7 @@ struct gdbarch startup_gdbarch = 0, /* float_format */ 0, /* double_format */ 0, /* long_double_format */ - 0, /* convert_from_func_ptr_addr */ + convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */ 0, /* addr_bits_remove */ 0, /* smash_text_address */ 0, /* software_single_step */ @@ -549,7 +549,7 @@ gdbarch_alloc (const struct gdbarch_info *info, current_gdbarch->deprecated_frame_args_address = get_frame_base; current_gdbarch->deprecated_frame_locals_address = get_frame_base; current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr; - current_gdbarch->convert_from_func_ptr_addr = core_addr_identity; + current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity; current_gdbarch->addr_bits_remove = core_addr_identity; current_gdbarch->smash_text_address = core_addr_identity; current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code; @@ -799,6 +799,9 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: GDB_MULTI_ARCH = %d\n", GDB_MULTI_ARCH); fprintf_unfiltered (file, + "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n", + (long) current_gdbarch->convert_from_func_ptr_addr); + fprintf_unfiltered (file, "gdbarch_dump: gdbarch_frame_align_p() = %d\n", gdbarch_frame_align_p (current_gdbarch)); fprintf_unfiltered (file, @@ -969,16 +972,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) fprintf_unfiltered (file, "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n", (long) current_gdbarch->construct_inferior_arguments); -#ifdef CONVERT_FROM_FUNC_PTR_ADDR - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "CONVERT_FROM_FUNC_PTR_ADDR(addr)", - XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr))); - fprintf_unfiltered (file, - "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n", - (long) current_gdbarch->convert_from_func_ptr_addr - /*CONVERT_FROM_FUNC_PTR_ADDR ()*/); -#endif #ifdef CONVERT_REGISTER_P fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -5110,13 +5103,13 @@ set_gdbarch_long_double_format (struct gdbarch *gdbarch, } CORE_ADDR -gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr) +gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ) { gdb_assert (gdbarch != NULL); gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL); if (gdbarch_debug >= 2) fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n"); - return gdbarch->convert_from_func_ptr_addr (addr); + return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ); } void |