aboutsummaryrefslogtreecommitdiff
path: root/gdb/regcache.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-05-13 12:27:30 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-05-13 12:27:30 +0000
commitfb4443d8bc8dd6d4b9c9a8af474da79a65deb0be (patch)
treefddb3e6ba581319a191f78ed9587f73cb3fc35dd /gdb/regcache.c
parentadc44effcb2e47b4410fa96c6e382d7a4695911e (diff)
downloadfsf-binutils-gdb-fb4443d8bc8dd6d4b9c9a8af474da79a65deb0be.zip
fsf-binutils-gdb-fb4443d8bc8dd6d4b9c9a8af474da79a65deb0be.tar.gz
fsf-binutils-gdb-fb4443d8bc8dd6d4b9c9a8af474da79a65deb0be.tar.bz2
* inferior.h (read_sp): Remove prototype.
* regcache.c (read_sp): Remove. * gcore.c (derive_stack_segment): Use get_frame_sp instead of read_sp. * infcall.c (call_function_by_hand): Likewise. * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Use regcache instead of calling read_sp. * rs6000-tdep.c (rs6000_push_dummy_call): Likewise.
Diffstat (limited to 'gdb/regcache.c')
-rw-r--r--gdb/regcache.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c
index daa412f..bb9cfde 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -867,8 +867,7 @@ regcache_raw_collect (const struct regcache *regcache, int regnum, void *buf)
}
-/* read_pc, write_pc, read_sp, etc. Special handling for registers
- PC, SP, and FP. */
+/* read_pc, write_pc, etc. Special handling for register PC. */
/* NOTE: cagney/2001-02-18: The functions read_pc_pid(), read_pc() and
read_sp(), will eventually be replaced by per-frame methods.
@@ -941,21 +940,6 @@ write_pc (CORE_ADDR pc)
write_pc_pid (pc, inferior_ptid);
}
-/* Cope with strage ways of getting to the stack and frame pointers */
-
-CORE_ADDR
-read_sp (void)
-{
- if (TARGET_READ_SP_P ())
- return TARGET_READ_SP ();
- else if (gdbarch_unwind_sp_p (current_gdbarch))
- return get_frame_sp (get_current_frame ());
- else if (SP_REGNUM >= 0)
- /* Try SP_REGNUM last: this makes all sorts of [wrong] assumptions
- about the architecture so put it at the end. */
- return read_register (SP_REGNUM);
- internal_error (__FILE__, __LINE__, _("read_sp: Unable to find SP"));
-}
static void
reg_flush_command (char *command, int from_tty)