From 378bfd1b7a2a1afc6553da2ae148a3908cf6d147 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Thu, 27 Mar 2003 15:29:45 +0000 Subject: [PATCH] 2003-03-27 Andrew Cagney * regcache.c (write_sp): Delete function and references. * inferior.h (write_sp): Delete declaration. * valops.c (hand_function_call): Replace write_sp with TARGET_WRITE_SP. * sparc-tdep.c (sparc_push_dummy_frame): Ditto. (sparc_pop_frame): Ditto. Index: doc/ChangeLog 2003-03-27 Andrew Cagney * gdbint.texinfo (Target Architecture Definition): Remove references to write_sp. --- gdb/ChangeLog | 9 +++++++++ gdb/doc/ChangeLog | 5 +++++ gdb/doc/gdbint.texinfo | 7 +++---- gdb/inferior.h | 2 -- gdb/regcache.c | 18 ++++++------------ gdb/sparc-tdep.c | 4 ++-- gdb/valops.c | 2 +- 7 files changed, 26 insertions(+), 21 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dc0d2560f4c..6ab01d82483 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2003-03-27 Andrew Cagney + + * regcache.c (write_sp): Delete function and references. + * inferior.h (write_sp): Delete declaration. + * valops.c (hand_function_call): Replace write_sp with + TARGET_WRITE_SP. + * sparc-tdep.c (sparc_push_dummy_frame): Ditto. + (sparc_pop_frame): Ditto. + 2003-03-27 Andrew Cagney * NEWS: Mention removal of support for hppa*-*-bsd* and diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index ab8a56dc393..1cc2b36d225 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2003-03-27 Andrew Cagney + + * gdbint.texinfo (Target Architecture Definition): Remove + references to write_sp. + 2003-03-27 Andrew Cagney * gdb.texinfo (GDB/MI Variable Objects): Replace @include with diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index bd2a722fedc..46bbe088321 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -3894,12 +3894,11 @@ Number of bits in a short integer; defaults to @code{2 * TARGET_CHAR_BIT}. @findex read_pc @findex write_pc @findex read_sp -@findex write_sp @findex read_fp These change the behavior of @code{read_pc}, @code{write_pc}, -@code{read_sp}, @code{write_sp} and @code{read_fp}. For most targets, -these may be left undefined. @value{GDBN} will call the read and write -register functions with the relevant @code{_REGNUM} argument. +@code{read_sp} and @code{read_fp}. For most targets, these may be left +undefined. @value{GDBN} will call the read and write register functions +with the relevant @code{_REGNUM} argument. These macros are useful when a target keeps one of these registers in a hard to get at place; for example, part in a segment register and part diff --git a/gdb/inferior.h b/gdb/inferior.h index 10da8ee5408..99316ccff9d 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -178,8 +178,6 @@ extern CORE_ADDR read_sp (void); extern CORE_ADDR generic_target_read_sp (void); -extern void write_sp (CORE_ADDR); - extern void generic_target_write_sp (CORE_ADDR); extern CORE_ADDR read_fp (void); diff --git a/gdb/regcache.c b/gdb/regcache.c index c66901780ae..70af06f2fab 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -1328,16 +1328,16 @@ regcache_collect (int regnum, void *buf) } -/* read_pc, write_pc, read_sp, write_sp, read_fp, etc. Special - handling for registers PC, SP, and FP. */ +/* read_pc, write_pc, read_sp, read_fp, etc. Special handling for + registers PC, SP, and FP. */ /* NOTE: cagney/2001-02-18: The functions generic_target_read_pc(), read_pc_pid(), read_pc(), generic_target_write_pc(), write_pc_pid(), write_pc(), generic_target_read_sp(), read_sp(), - generic_target_write_sp(), write_sp(), generic_target_read_fp() and - read_fp(), will eventually be moved out of the reg-cache into - either frame.[hc] or to the multi-arch framework. The are not part - of the raw register cache. */ + generic_target_write_sp(), generic_target_read_fp() and read_fp(), + will eventually be moved out of the reg-cache into either + frame.[hc] or to the multi-arch framework. The are not part of the + raw register cache. */ /* This routine is getting awfully cluttered with #if's. It's probably time to turn this into READ_PC and define it in the tm.h file. @@ -1456,12 +1456,6 @@ generic_target_write_sp (CORE_ADDR val) "generic_target_write_sp"); } -void -write_sp (CORE_ADDR val) -{ - TARGET_WRITE_SP (val); -} - CORE_ADDR generic_target_read_fp (void) { diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index c638bd65ac4..59079b0a013 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1040,7 +1040,7 @@ sparc_push_dummy_frame (void) sp -= DUMMY_STACK_SIZE; - write_sp (sp); + TARGET_WRITE_SP (sp); write_memory (sp + DUMMY_REG_SAVE_OFFSET, ®ister_temp[0], DUMMY_STACK_REG_BUF_SIZE); @@ -1310,7 +1310,7 @@ sparc_pop_frame (void) read_memory_integer (fsr[O0_REGNUM + 7], SPARC_INTREG_SIZE)); - write_sp (get_frame_base (frame)); + TARGET_WRITE_SP (get_frame_base (frame)); } else if (fsr[I0_REGNUM]) { diff --git a/gdb/valops.c b/gdb/valops.c index a7453e97cb8..1a5956c38d7 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1697,7 +1697,7 @@ You must use a pointer to function type variable. Command ignored.", arg_name); frame), and none of the code following that code adjusts the stack-pointer value, the below call is entirely redundant. */ if (!gdbarch_push_dummy_call_p (current_gdbarch)) - write_sp (sp); + TARGET_WRITE_SP (sp); if (SAVE_DUMMY_FRAME_TOS_P ()) SAVE_DUMMY_FRAME_TOS (sp); -- 2.30.2