This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[obish] Garbage collect deprecated fp/pc/sp functions


Our frame-ified architectures never call these, removed.

committed,
Andrew
2004-08-05  Andrew Cagney  <cagney@gnu.org>

	* gdbarch.sh (deprecated_frame_saved_pc): Delete.
	* gdbarch.h, gdbarch.c: Re-generate.
	* regcache.c (deprecated_read_fp, deprecated_write_sp): Delete.
	* inferior.h (deprecated_read_fp, deprecated_write_sp): Delete.
	* frame.h: Delete deprecated_read_fp from comments.
	* arch-utils.c (deprecated_init_frame_pc_default): Delete.
	* arch-utils.h (deprecated_init_frame_pc_default): Delete.

Index: doc/ChangeLog
2004-08-05  Andrew Cagney  <cagney@gnu.org>

	* gdbint.texinfo (Target Architecture Definition): Delete
	reference to deprecated_read_fp.

Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.121
diff -p -u -r1.121 arch-utils.c
--- arch-utils.c	2 Aug 2004 21:58:43 -0000	1.121
+++ arch-utils.c	5 Aug 2004 14:09:39 -0000
@@ -228,17 +228,6 @@ no_op_reg_to_regnum (int reg)
   return reg;
 }
 
-CORE_ADDR
-deprecated_init_frame_pc_default (int fromleaf, struct frame_info *prev)
-{
-  if (fromleaf && DEPRECATED_SAVED_PC_AFTER_CALL_P ())
-    return DEPRECATED_SAVED_PC_AFTER_CALL (get_next_frame (prev));
-  else if (get_next_frame (prev) != NULL)
-    return DEPRECATED_FRAME_SAVED_PC (get_next_frame (prev));
-  else
-    return read_pc ();
-}
-
 void
 default_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
 {
Index: arch-utils.h
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.h,v
retrieving revision 1.74
diff -p -u -r1.74 arch-utils.h
--- arch-utils.h	20 Jun 2004 18:10:13 -0000	1.74
+++ arch-utils.h	5 Aug 2004 14:09:39 -0000
@@ -72,10 +72,6 @@ extern gdbarch_convert_from_func_ptr_add
 
 extern int no_op_reg_to_regnum (int reg);
 
-/* Versions of init_frame_pc().  Do nothing; do the default. */
-
-extern CORE_ADDR deprecated_init_frame_pc_default (int fromleaf, struct frame_info *prev);
-
 /* Do nothing version of elf_make_msymbol_special. */
 
 void default_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym);
Index: frame.h
===================================================================
RCS file: /cvs/src/src/gdb/frame.h,v
retrieving revision 1.142
diff -p -u -r1.142 frame.h
--- frame.h	2 Aug 2004 19:44:39 -0000	1.142
+++ frame.h	5 Aug 2004 14:09:39 -0000
@@ -650,7 +650,7 @@ extern void deprecated_update_frame_pc_h
 
 /* FIXME: cagney/2002-12-18: Has the frame's base changed?  Or to be
    more exact, was that initial guess at the frame's base as returned
-   by deprecated_read_fp() wrong?  If it was, fix it.  This shouldn't
+   by the deleted read_fp() wrong?  If it was, fix it.  This shouldn't
    be necessary since the code should be getting the frame's base
    correct from the outset.
 
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.342
diff -p -u -r1.342 gdbarch.sh
--- gdbarch.sh	3 Aug 2004 03:52:01 -0000	1.342
+++ gdbarch.sh	5 Aug 2004 14:09:40 -0000
@@ -575,10 +575,6 @@ v:=:CORE_ADDR:deprecated_function_start_
 m::void:remote_translate_xfer_address:struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len:regcache, gdb_addr, gdb_len, rem_addr, rem_len:::generic_remote_translate_xfer_address::0
 #
 v:=:CORE_ADDR:frame_args_skip::::0:::0
-# DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC.  Please
-# note, per UNWIND_PC's doco, that while the two have similar
-# interfaces they have very different underlying implementations.
-F:=:CORE_ADDR:deprecated_frame_saved_pc:struct frame_info *fi:fi
 M::CORE_ADDR:unwind_pc:struct frame_info *next_frame:next_frame
 M::CORE_ADDR:unwind_sp:struct frame_info *next_frame:next_frame
 # DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame
Index: inferior.h
===================================================================
RCS file: /cvs/src/src/gdb/inferior.h,v
retrieving revision 1.65
diff -p -u -r1.65 inferior.h
--- inferior.h	12 May 2004 22:19:02 -0000	1.65
+++ inferior.h	5 Aug 2004 14:09:40 -0000
@@ -176,10 +176,6 @@ extern void generic_target_write_pc (COR
 
 extern CORE_ADDR read_sp (void);
 
-extern void deprecated_write_sp (CORE_ADDR);
-
-extern CORE_ADDR deprecated_read_fp (void);
-
 extern CORE_ADDR unsigned_pointer_to_address (struct type *type, const void *buf);
 
 extern void unsigned_address_to_pointer (struct type *type, void *buf,
Index: regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/regcache.c,v
retrieving revision 1.125
diff -p -u -r1.125 regcache.c
--- regcache.c	4 Aug 2004 17:50:55 -0000	1.125
+++ regcache.c	5 Aug 2004 14:09:40 -0000
@@ -1066,19 +1066,18 @@ regcache_raw_collect (const struct regca
 }
 
 
-/* read_pc, write_pc, read_sp, deprecated_read_fp, etc.  Special
-   handling for registers PC, SP, and FP.  */
+/* read_pc, write_pc, read_sp, etc.  Special handling for registers
+   PC, SP, and FP.  */
 
-/* NOTE: cagney/2001-02-18: The functions read_pc_pid(), read_pc(),
-   read_sp(), and deprecated_read_fp(), will eventually be replaced by
-   per-frame methods.  Instead of relying on the global INFERIOR_PTID,
-   they will use the contextual information provided by the FRAME.
-   These functions do not belong in the register cache.  */
+/* NOTE: cagney/2001-02-18: The functions read_pc_pid(), read_pc() and
+   read_sp(), will eventually be replaced by per-frame methods.
+   Instead of relying on the global INFERIOR_PTID, they will use the
+   contextual information provided by the FRAME.  These functions do
+   not belong in the register cache.  */
 
 /* NOTE: cagney/2003-06-07: The functions generic_target_write_pc(),
-   write_pc_pid(), write_pc(), and deprecated_read_fp(), all need to
-   be replaced by something that does not rely on global state.  But
-   what?  */
+   write_pc_pid() and write_pc(), all need to be replaced by something
+   that does not rely on global state.  But what?  */
 
 CORE_ADDR
 read_pc_pid (ptid_t ptid)
@@ -1157,22 +1156,6 @@ read_sp (void)
   internal_error (__FILE__, __LINE__, "read_sp: Unable to find SP");
 }
 
-void
-deprecated_write_sp (CORE_ADDR val)
-{
-  gdb_assert (SP_REGNUM >= 0);
-  write_register (SP_REGNUM, val);
-}
-
-CORE_ADDR
-deprecated_read_fp (void)
-{
-  if (DEPRECATED_FP_REGNUM >= 0)
-    return read_register (DEPRECATED_FP_REGNUM);
-  else
-    internal_error (__FILE__, __LINE__, "deprecated_read_fp");
-}
-
 static void
 reg_flush_command (char *command, int from_tty)
 {
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.215
diff -p -u -r1.215 gdbint.texinfo
--- doc/gdbint.texinfo	3 Aug 2004 02:02:24 -0000	1.215
+++ doc/gdbint.texinfo	5 Aug 2004 14:09:41 -0000
@@ -3834,9 +3834,9 @@ Number of bits in a short integer; defau
 @findex read_sp
 @findex read_fp
 @anchor{TARGET_READ_SP} These change the behavior of @code{read_pc},
-@code{write_pc}, @code{read_sp} and @code{deprecated_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{write_pc} and @code{read_sp}.  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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]