2003-08-27 Andrew Cagney * ppc-linux-tdep.c (ppc64_call_dummy_address): Delete function. (ppc_linux_init_abi): For PPC64, do not set call_dummy_address. * infcall.c (call_function_by_hand): Convert the entry point address into a code address. Index: infcall.c =================================================================== RCS file: /cvs/src/src/gdb/infcall.c,v retrieving revision 1.23 diff -u -r1.23 infcall.c --- infcall.c 18 Aug 2003 20:04:55 -0000 1.23 +++ infcall.c 27 Aug 2003 20:03:46 -0000 @@ -558,6 +558,9 @@ } real_pc = funaddr; dummy_addr = 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); /* 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; @@ -576,6 +579,11 @@ dummy_addr = SYMBOL_VALUE_ADDRESS (sym); else 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); + /* 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; break; } Index: ppc-linux-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/ppc-linux-tdep.c,v retrieving revision 1.37 diff -u -r1.37 ppc-linux-tdep.c --- ppc-linux-tdep.c 24 Jun 2003 23:09:22 -0000 1.37 +++ ppc-linux-tdep.c 27 Aug 2003 20:03:51 -0000 @@ -929,18 +929,6 @@ } -/* On 64-bit PowerPC GNU/Linux, the ELF header's e_entry field is the - address of a function descriptor for the entry point function, not - the actual entry point itself. So to find the actual address at - which execution should begin, we need to fetch the function's entry - point from that descriptor. */ -static CORE_ADDR -ppc64_call_dummy_address (void) -{ - return ppc64_desc_entry_point (entry_point_address ()); -} - - enum { ELF_NGREG = 48, ELF_NFPREG = 33, @@ -1066,8 +1054,6 @@ function descriptors). */ set_gdbarch_convert_from_func_ptr_addr (gdbarch, ppc64_linux_convert_from_func_ptr_addr); - - set_gdbarch_call_dummy_address (gdbarch, ppc64_call_dummy_address); set_gdbarch_in_solib_call_trampoline (gdbarch, ppc64_in_solib_call_trampoline);