aboutsummaryrefslogtreecommitdiff
path: root/gdb/infcall.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-10-22 23:54:11 +0000
committerAndrew Cagney <cagney@redhat.com>2003-10-22 23:54:11 +0000
commite2d0e7eb0476ade97ed7c00e7a3838609d52d084 (patch)
tree455a8bf9468a11414a1542bc9b5d76a2f1583200 /gdb/infcall.c
parentf1c07ab0ca71fdadc64f2838f87f39784aee5b63 (diff)
downloadfsf-binutils-gdb-e2d0e7eb0476ade97ed7c00e7a3838609d52d084.zip
fsf-binutils-gdb-e2d0e7eb0476ade97ed7c00e7a3838609d52d084.tar.gz
fsf-binutils-gdb-e2d0e7eb0476ade97ed7c00e7a3838609d52d084.tar.bz2
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/infcall.c')
-rw-r--r--gdb/infcall.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/infcall.c b/gdb/infcall.c
index f9cb87e..75c7f4e 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -182,7 +182,9 @@ find_function_addr (struct value *function, struct type **retval_type)
if (TYPE_CODE (ftype) == TYPE_CODE_FUNC
|| TYPE_CODE (ftype) == TYPE_CODE_METHOD)
{
- funaddr = CONVERT_FROM_FUNC_PTR_ADDR (funaddr);
+ funaddr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
+ funaddr,
+ &current_target);
value_type = TYPE_TARGET_TYPE (ftype);
}
else
@@ -562,7 +564,9 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
dummy_addr = DEPRECATED_CALL_DUMMY_ADDRESS ();
/* Make certain that the address points at real code, and not a
function descriptor. */
- dummy_addr = CONVERT_FROM_FUNC_PTR_ADDR (dummy_addr);
+ dummy_addr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
+ dummy_addr,
+ &current_target);
/* A call dummy always consists of just a single breakpoint, so
it's address is the same as the address of the dummy. */
bp_addr = dummy_addr;
@@ -583,7 +587,9 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
dummy_addr = entry_point_address ();
/* Make certain that the address points at real code, and not
a function descriptor. */
- dummy_addr = CONVERT_FROM_FUNC_PTR_ADDR (dummy_addr);
+ dummy_addr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
+ dummy_addr,
+ &current_target);
/* A call dummy always consists of just a single breakpoint,
so it's address is the same as the address of the dummy. */
bp_addr = dummy_addr;