This is the mail archive of the gdb-patches@sourceware.org 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]

[commit] Garbage collect deprecated_{extract|store}_return_value


Nothing uses them anymore.  As a result we don't need to grub in the
regcache anymore!

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* gdbarch.sh (deprecated_extract_return_value)
	(deprecated_store_return_value): Remove.
	(extract_return_value, store_return_value): Remove default values.
	* gdbarch.c, gdbarch.h: Regenerate.
	* arch-utils.c, arch-utils.h (legacy_extract_return_value)
	(legacy_store_return_value): Remove.
	* regcache.c, regcache.h (deprecated_grub_regcache_for_registers):
	Remove.

Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.371
diff -u -p -r1.371 gdbarch.sh
--- gdbarch.sh 9 Jan 2007 17:58:50 -0000 1.371
+++ gdbarch.sh 13 Jan 2007 23:18:58 -0000
@@ -524,10 +524,8 @@ M::enum return_value_convention:return_v
 # DEPRECATED_USE_STRUCT_CONVENTION have all been folded into
 # RETURN_VALUE.
 
-f:=:void:extract_return_value:struct type *type, struct regcache *regcache, gdb_byte *valbuf:type, regcache, valbuf::legacy_extract_return_value::0
-f:=:void:store_return_value:struct type *type, struct regcache *regcache, const gdb_byte *valbuf:type, regcache, valbuf::legacy_store_return_value::0
-f:=:void:deprecated_extract_return_value:struct type *type, gdb_byte *regbuf, gdb_byte *valbuf:type, regbuf, valbuf
-f:=:void:deprecated_store_return_value:struct type *type, gdb_byte *valbuf:type, valbuf
+f:=:void:extract_return_value:struct type *type, struct regcache *regcache, gdb_byte *valbuf:type, regcache, valbuf:0
+f:=:void:store_return_value:struct type *type, struct regcache *regcache, const gdb_byte *valbuf:type, regcache, valbuf:0
 f:=:int:deprecated_use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type::generic_use_struct_convention::0
 
 # As of 2004-01-17 only the 32-bit SPARC ABI has been identified as an
Index: gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.334
diff -u -p -r1.334 gdbarch.c
--- gdbarch.c 8 Jan 2007 20:03:48 -0000 1.334
+++ gdbarch.c 13 Jan 2007 23:19:21 -0000
@@ -191,8 +191,6 @@ struct gdbarch
   gdbarch_return_value_ftype *return_value;
   gdbarch_extract_return_value_ftype *extract_return_value;
   gdbarch_store_return_value_ftype *store_return_value;
-  gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
-  gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
   gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention;
   gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
   gdbarch_skip_prologue_ftype *skip_prologue;
@@ -320,8 +318,6 @@ struct gdbarch startup_gdbarch =
   0,  /* return_value */
   0,  /* extract_return_value */
   0,  /* store_return_value */
-  0,  /* deprecated_extract_return_value */
-  0,  /* deprecated_store_return_value */
   0,  /* deprecated_use_struct_convention */
   0,  /* deprecated_extract_struct_value_address */
   0,  /* skip_prologue */
@@ -439,8 +435,6 @@ gdbarch_alloc (const struct gdbarch_info
   current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
   current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
   current_gdbarch->return_value = legacy_return_value;
-  current_gdbarch->extract_return_value = legacy_extract_return_value;
-  current_gdbarch->store_return_value = legacy_store_return_value;
   current_gdbarch->deprecated_use_struct_convention = generic_use_struct_convention;
   current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
   current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
@@ -575,8 +569,6 @@ verify_gdbarch (struct gdbarch *current_
   /* Skip verify of integer_to_address, has predicate */
   /* Skip verify of deprecated_store_struct_return, has predicate */
   /* Skip verify of return_value, has predicate */
-  /* Skip verify of extract_return_value, invalid_p == 0 */
-  /* Skip verify of store_return_value, invalid_p == 0 */
   /* Skip verify of deprecated_use_struct_convention, invalid_p == 0 */
   /* Skip verify of deprecated_extract_struct_value_address, has predicate */
   if (current_gdbarch->skip_prologue == 0)
@@ -844,15 +836,6 @@ gdbarch_dump (struct gdbarch *current_gd
   fprintf_unfiltered (file,
                       "gdbarch_dump: decr_pc_after_break = 0x%s\n",
                       paddr_nz (current_gdbarch->decr_pc_after_break));
-#ifdef DEPRECATED_EXTRACT_RETURN_VALUE
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
-                      XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
-#endif
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: deprecated_extract_return_value = <0x%lx>\n",
-                      (long) current_gdbarch->deprecated_extract_return_value);
 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -949,15 +932,6 @@ gdbarch_dump (struct gdbarch *current_gd
   fprintf_unfiltered (file,
                       "gdbarch_dump: deprecated_stack_align = <0x%lx>\n",
                       (long) current_gdbarch->deprecated_stack_align);
-#ifdef DEPRECATED_STORE_RETURN_VALUE
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
-                      XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
-#endif
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: deprecated_store_return_value = <0x%lx>\n",
-                      (long) current_gdbarch->deprecated_store_return_value);
 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -2813,40 +2787,6 @@ set_gdbarch_store_return_value (struct g
   gdbarch->store_return_value = store_return_value;
 }
 
-void
-gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *regbuf, gdb_byte *valbuf)
-{
-  gdb_assert (gdbarch != NULL);
-  gdb_assert (gdbarch->deprecated_extract_return_value != NULL);
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
-  gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
-}
-
-void
-set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
-                                             gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
-{
-  gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
-}
-
-void
-gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *valbuf)
-{
-  gdb_assert (gdbarch != NULL);
-  gdb_assert (gdbarch->deprecated_store_return_value != NULL);
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
-  gdbarch->deprecated_store_return_value (type, valbuf);
-}
-
-void
-set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
-                                           gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
-{
-  gdbarch->deprecated_store_return_value = deprecated_store_return_value;
-}
-
 int
 gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
 {
Index: gdbarch.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.h,v
retrieving revision 1.290
diff -u -p -r1.290 gdbarch.h
--- gdbarch.h 8 Jan 2007 20:03:48 -0000 1.290
+++ gdbarch.h 13 Jan 2007 23:19:34 -0000
@@ -804,26 +804,6 @@ extern void set_gdbarch_store_return_val
 #define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, valbuf))
 #endif
 
-typedef void (gdbarch_deprecated_extract_return_value_ftype) (struct type *type, gdb_byte *regbuf, gdb_byte *valbuf);
-extern void gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *regbuf, gdb_byte *valbuf);
-extern void set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value);
-#if !defined (GDB_TM_FILE) && defined (DEPRECATED_EXTRACT_RETURN_VALUE)
-#error "Non multi-arch definition of DEPRECATED_EXTRACT_RETURN_VALUE"
-#endif
-#if !defined (DEPRECATED_EXTRACT_RETURN_VALUE)
-#define DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf) (gdbarch_deprecated_extract_return_value (current_gdbarch, type, regbuf, valbuf))
-#endif
-
-typedef void (gdbarch_deprecated_store_return_value_ftype) (struct type *type, gdb_byte *valbuf);
-extern void gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, gdb_byte *valbuf);
-extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value);
-#if !defined (GDB_TM_FILE) && defined (DEPRECATED_STORE_RETURN_VALUE)
-#error "Non multi-arch definition of DEPRECATED_STORE_RETURN_VALUE"
-#endif
-#if !defined (DEPRECATED_STORE_RETURN_VALUE)
-#define DEPRECATED_STORE_RETURN_VALUE(type, valbuf) (gdbarch_deprecated_store_return_value (current_gdbarch, type, valbuf))
-#endif
-
 typedef int (gdbarch_deprecated_use_struct_convention_ftype) (int gcc_p, struct type *value_type);
 extern int gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type);
 extern void set_gdbarch_deprecated_use_struct_convention (struct gdbarch *gdbarch, gdbarch_deprecated_use_struct_convention_ftype *deprecated_use_struct_convention);
Index: regcache.c
===================================================================
RCS file: /cvs/src/src/gdb/regcache.c,v
retrieving revision 1.141
diff -u -p -r1.141 regcache.c
--- regcache.c 13 Jan 2007 22:32:13 -0000 1.141
+++ regcache.c 13 Jan 2007 23:19:39 -0000
@@ -388,12 +388,6 @@ regcache_valid_p (struct regcache *regca
   return regcache->register_valid_p[regnum];
 }
 
-gdb_byte *
-deprecated_grub_regcache_for_registers (struct regcache *regcache)
-{
-  return regcache->registers;
-}
-
 /* Global structure containing the current regcache.  */
 /* FIXME: cagney/2002-05-11: The two global arrays registers[] and
    deprecated_register_valid[] currently point into this structure.  */
Index: regcache.h
===================================================================
RCS file: /cvs/src/src/gdb/regcache.h,v
retrieving revision 1.50
diff -u -p -r1.50 regcache.h
--- regcache.h 13 Jan 2007 22:32:14 -0000 1.50
+++ regcache.h 13 Jan 2007 23:19:40 -0000
@@ -171,7 +171,6 @@ extern void regcache_cpy_no_passthrough 
    method, there should already be a non-deprecated variant that is
    parameterized with FRAME or REGCACHE.  */
 
-extern gdb_byte *deprecated_grub_regcache_for_registers (struct regcache *);
 extern void deprecated_read_register_gen (int regnum, gdb_byte *myaddr);
 extern void deprecated_write_register_gen (int regnum, gdb_byte *myaddr);
 
Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.137
diff -u -p -r1.137 arch-utils.c
--- arch-utils.c 9 Jan 2007 22:55:10 -0000 1.137
+++ arch-utils.c 13 Jan 2007 23:19:44 -0000
@@ -38,29 +38,6 @@
 
 #include "floatformat.h"
 
-/* Implementation of extract return value that grubs around in the
-   register cache.  */
-void
-legacy_extract_return_value (struct type *type, struct regcache *regcache,
-			     gdb_byte *valbuf)
-{
-  gdb_byte *registers = deprecated_grub_regcache_for_registers (regcache);
-  gdb_byte *buf = valbuf;
-  DEPRECATED_EXTRACT_RETURN_VALUE (type, registers, buf); /* OK */
-}
-
-/* Implementation of store return value that grubs the register cache.
-   Takes a local copy of the buffer to avoid const problems.  */
-void
-legacy_store_return_value (struct type *type, struct regcache *regcache,
-			   const gdb_byte *buf)
-{
-  gdb_byte *b = alloca (TYPE_LENGTH (type));
-  gdb_assert (regcache == current_regcache);
-  memcpy (b, buf, TYPE_LENGTH (type));
-  DEPRECATED_STORE_RETURN_VALUE (type, b);
-}
-
 int
 always_use_struct_convention (int gcc_p, struct type *value_type)
 {
@@ -312,17 +289,6 @@ generic_convert_register_p (int regnum, 
 int
 default_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
 {
-  if (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()
-      && DEPRECATED_REG_STRUCT_HAS_ADDR (processing_gcc_compilation, type))
-    {
-      CHECK_TYPEDEF (type);
-
-      return (TYPE_CODE (type) == TYPE_CODE_STRUCT
-	      || TYPE_CODE (type) == TYPE_CODE_UNION
-	      || TYPE_CODE (type) == TYPE_CODE_SET
-	      || TYPE_CODE (type) == TYPE_CODE_BITSTRING);
-    }
-
   return 0;
 }
 
Index: arch-utils.h
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.h,v
retrieving revision 1.82
diff -u -p -r1.82 arch-utils.h
--- arch-utils.h 9 Jan 2007 17:58:49 -0000 1.82
+++ arch-utils.h 13 Jan 2007 23:19:45 -0000
@@ -41,13 +41,6 @@ enum return_value_convention legacy_retu
 						  gdb_byte *readbuf,
 						  const gdb_byte *writebuf);
 
-/* Implementation of extract return value that grubs around in the
-   register cache.  */
-extern gdbarch_extract_return_value_ftype legacy_extract_return_value;
-
-/* Implementation of store return value that grubs the register cache.  */
-extern gdbarch_store_return_value_ftype legacy_store_return_value;
-
 /* To return any structure or union type by value, store it at the
    address passed as an invisible first argument to the function.  */
 extern gdbarch_deprecated_use_struct_convention_ftype always_use_struct_convention;


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