diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-10-31 16:37:03 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-10-31 16:37:03 +0000 |
commit | 6066c3de513998f9c90c14385bf5e1b9ab626cc0 (patch) | |
tree | aaf6652db0db340f2200a57c214be76ece6d934d /gdb/ppc-sysv-tdep.c | |
parent | 4b8a223fcb9a9d720b65cb6bc36ff82982e0bf4d (diff) | |
download | gdb-6066c3de513998f9c90c14385bf5e1b9ab626cc0.zip gdb-6066c3de513998f9c90c14385bf5e1b9ab626cc0.tar.gz gdb-6066c3de513998f9c90c14385bf5e1b9ab626cc0.tar.bz2 |
2003-10-31 Andrew Cagney <cagney@redhat.com>
* rs6000-tdep.c (rs6000_gdbarch_init): For 64-bit ABI, set
adjust_breakpoint_address.
* Makefile.in (ppc-sysv-tdep.o): Add $(target_h).
* ppc-tdep.h (ppc64_sysv_abi_adjust_breakpoint_address): Declare.
* ppc-sysv-tdep.c: Include "target.h". Update copyright.
(ppc64_sysv_abi_adjust_breakpoint_address): New function.
Diffstat (limited to 'gdb/ppc-sysv-tdep.c')
-rw-r--r-- | gdb/ppc-sysv-tdep.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c index 0fb0d6a..02f2ea2 100644 --- a/gdb/ppc-sysv-tdep.c +++ b/gdb/ppc-sysv-tdep.c @@ -1,7 +1,7 @@ /* Target-dependent code for PowerPC systems using the SVR4 ABI for GDB, the GNU debugger. - Copyright 2000, 2001, 2002 Free Software Foundation, Inc. + Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GDB. @@ -28,6 +28,7 @@ #include "gdb_string.h" #include "gdb_assert.h" #include "ppc-tdep.h" +#include "target.h" /* Pass the arguments in either registers, or in the stack. Using the ppc sysv ABI, the first eight words of the argument list (that might @@ -1013,3 +1014,21 @@ ppc64_sysv_abi_store_return_value (struct type *valtype, if (!ppc64_sysv_abi_return_value (valtype, regbuf, valbuf, NULL)) error ("Function return value location unknown"); } + +CORE_ADDR +ppc64_sysv_abi_adjust_breakpoint_address (struct gdbarch *gdbarch, + CORE_ADDR bpaddr) +{ + /* PPC64 SYSV specifies that the minimal-symbol "FN" should point at + a function-descriptor while the corresponding minimal-symbol + ".FN" should point at the entry point. Consequently, a command + like "break FN" applied to an object file with only minimal + symbols, will insert the breakpoint into the descriptor at "FN" + and not the function at ".FN". Avoid this confusion by adjusting + any attempt to set a descriptor breakpoint into a corresponding + function breakpoint. Note that GDB warns the user when this + adjustment is applied - that's ok as otherwise the user will have + no way of knowing why their breakpoint at "FN" resulted in the + program stopping at ".FN". */ + return gdbarch_convert_from_func_ptr_addr (gdbarch, bpaddr, ¤t_target); +} |