2007-06-18 Markus Deuling <deuling@de.ibm.com>
authorUlrich Weigand <uweigand@de.ibm.com>
Mon, 18 Jun 2007 18:28:29 +0000 (18:28 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Mon, 18 Jun 2007 18:28:29 +0000 (18:28 +0000)
* gdbarch.sh (EXTRACT_RETURN_VALUE): Replace with
gdbarch_extract_return_value.
* value.c (generic_use_struct_convention): Likewise (comment).
* ia64-tdep.c (ia64_use_struct_convention): Likewise (comment).
* arch-utils.c (legacy_return_value): Likewise.
* arch-utils.h (legacy_return_value): Likewise (comment).
* gdbarch.sh (STORE_RETURN_VALUE): Replace by
gdbarch_store_return_value.
* stack.c (return_command): Likewise (comment).
* arch-utils.h (legacy_return_value): Likewise (comment).
* arch-utils.c (legacy_return_value): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.

gdb/arch-utils.c
gdb/arch-utils.h
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/ia64-tdep.c
gdb/stack.c
gdb/value.c

index 687dc22f1b31c0a3494a20e392f5d94aeca207ed..73e45205a2bd38031b14d020baeba154435f9fa7 100644 (file)
@@ -61,17 +61,18 @@ legacy_return_value (struct gdbarch *gdbarch, struct type *valtype,
     {
       gdb_assert (!struct_return);
       /* NOTE: cagney/2004-06-13: See stack.c:return_command.  Old
-        architectures don't expect STORE_RETURN_VALUE to handle small
+        architectures don't expect store_return_value to handle small
         structures.  Should not be called with such types.  */
       gdb_assert (TYPE_CODE (valtype) != TYPE_CODE_STRUCT
                  && TYPE_CODE (valtype) != TYPE_CODE_UNION);
-      STORE_RETURN_VALUE (valtype, regcache, writebuf);
+      gdbarch_store_return_value (current_gdbarch, valtype, regcache, writebuf);
     }
 
   if (readbuf != NULL)
     {
       gdb_assert (!struct_return);
-      EXTRACT_RETURN_VALUE (valtype, regcache, readbuf);
+      gdbarch_extract_return_value (current_gdbarch,
+                                   valtype, regcache, readbuf);
     }
 
   if (struct_return)
index 8520b33326c40221bed06869aad493ef0d5c52cb..d49fe139d5ecd37b2931ad6ac4f21106868860f1 100644 (file)
@@ -33,8 +33,8 @@ struct gdbarch_info;
 extern int gdbarch_debug;
 
 /* An implementation of return_value that props up architectures still
-   using USE_STRUCT_RETURN, EXTRACT_RETURN_VALUE and
-   STORE_RETURN_VALUE.  See also the hacks in "stack.c".  */
+   using USE_STRUCT_RETURN, gdbarch_extract_return_value and
+   store_return_value.  See also the hacks in "stack.c".  */
 enum return_value_convention legacy_return_value (struct gdbarch *gdbarch,
                                                  struct type *valtype,
                                                  struct regcache *regcache,
index 36b3a8823b8b856d5a24fa1591ae50e9c735d37f..543c8d043d0fe9863c58970b366fd29417a596f8 100644 (file)
@@ -768,12 +768,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: elf_make_msymbol_special = <0x%lx>\n",
                       (long) current_gdbarch->elf_make_msymbol_special);
-#ifdef EXTRACT_RETURN_VALUE
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
-                      XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: extract_return_value = <0x%lx>\n",
                       (long) current_gdbarch->extract_return_value);
@@ -1035,12 +1029,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: stabs_argument_has_addr = <0x%lx>\n",
                       (long) current_gdbarch->stabs_argument_has_addr);
-#ifdef STORE_RETURN_VALUE
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "STORE_RETURN_VALUE(type, regcache, valbuf)",
-                      XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: store_return_value = <0x%lx>\n",
                       (long) current_gdbarch->store_return_value);
index 0eb5e6520d90e53b762358dc4678eacdca4fe058..c7d858643db5442ea2bf951a3bf8ae6343b8cd8a 100644 (file)
@@ -383,7 +383,7 @@ extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_int
    should take the type/value of the function to be called and not the
    return type.  This is left as an exercise for the reader.
    NOTE: cagney/2004-06-13: The function stack.c:return_command uses
-   the predicate with default hack to avoid calling STORE_RETURN_VALUE
+   the predicate with default hack to avoid calling store_return_value
    (via legacy_return_value), when a small struct is involved. */
 
 extern int gdbarch_return_value_p (struct gdbarch *gdbarch);
@@ -392,7 +392,7 @@ typedef enum return_value_convention (gdbarch_return_value_ftype) (struct gdbarc
 extern enum return_value_convention gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf);
 extern void set_gdbarch_return_value (struct gdbarch *gdbarch, gdbarch_return_value_ftype *return_value);
 
-/* The deprecated methods EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
+/* The deprecated methods extract_return_value, store_return_value,
    DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS and
    deprecated_use_struct_convention have all been folded into
    RETURN_VALUE. */
@@ -400,22 +400,10 @@ extern void set_gdbarch_return_value (struct gdbarch *gdbarch, gdbarch_return_va
 typedef void (gdbarch_extract_return_value_ftype) (struct type *type, struct regcache *regcache, gdb_byte *valbuf);
 extern void gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, gdb_byte *valbuf);
 extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_extract_return_value_ftype *extract_return_value);
-#if !defined (GDB_TM_FILE) && defined (EXTRACT_RETURN_VALUE)
-#error "Non multi-arch definition of EXTRACT_RETURN_VALUE"
-#endif
-#if !defined (EXTRACT_RETURN_VALUE)
-#define EXTRACT_RETURN_VALUE(type, regcache, valbuf) (gdbarch_extract_return_value (current_gdbarch, type, regcache, valbuf))
-#endif
 
 typedef void (gdbarch_store_return_value_ftype) (struct type *type, struct regcache *regcache, const gdb_byte *valbuf);
 extern void gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const gdb_byte *valbuf);
 extern void set_gdbarch_store_return_value (struct gdbarch *gdbarch, gdbarch_store_return_value_ftype *store_return_value);
-#if !defined (GDB_TM_FILE) && defined (STORE_RETURN_VALUE)
-#error "Non multi-arch definition of STORE_RETURN_VALUE"
-#endif
-#if !defined (STORE_RETURN_VALUE)
-#define STORE_RETURN_VALUE(type, regcache, valbuf) (gdbarch_store_return_value (current_gdbarch, type, regcache, 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);
index 67a5bdb994b3f270c60127969a8eecb87201da31..697b84c1931cbe2af584700c8b84ebeaa5c60150 100755 (executable)
@@ -503,18 +503,18 @@ M::CORE_ADDR:integer_to_address:struct type *type, const gdb_byte *buf:type, buf
 # return type.  This is left as an exercise for the reader.
 
 # NOTE: cagney/2004-06-13: The function stack.c:return_command uses
-# the predicate with default hack to avoid calling STORE_RETURN_VALUE
+# the predicate with default hack to avoid calling store_return_value
 # (via legacy_return_value), when a small struct is involved.
 
 M::enum return_value_convention:return_value:struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf:valtype, regcache, readbuf, writebuf::legacy_return_value
 
-# The deprecated methods EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
+# The deprecated methods extract_return_value, store_return_value,
 # DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS and
 # 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:0
-f:=:void:store_return_value:struct type *type, struct regcache *regcache, const gdb_byte *valbuf:type, regcache, valbuf:0
+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
 
 f::CORE_ADDR:skip_prologue:CORE_ADDR ip:ip:0:0
index 841215dc108226b5d5f7761d6050289cf76cbdcf..af4eff4064f0c630acc2587622b7fab2737d6675 100644 (file)
@@ -2923,7 +2923,7 @@ static struct libunwind_descr ia64_libunwind_descr =
 #endif /* HAVE_LIBUNWIND_IA64_H  */
 
 /* Should we use DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS instead of
-   EXTRACT_RETURN_VALUE?  GCC_P is true if compiled with gcc and TYPE
+   gdbarch_extract_return_value?  GCC_P is true if compiled with gcc and TYPE
    is the type (which is known to be struct, union or array).  */
 int
 ia64_use_struct_convention (int gcc_p, struct type *type)
index aaeb1d1c2099b8ee3815a1f2ce36caae74a9c2f4..fdbb724f8da6719ad20d6055b05ee8196842e798 100644 (file)
@@ -1792,7 +1792,7 @@ return_command (char *retval_exp, int from_tty)
                   || TYPE_CODE (return_type) == TYPE_CODE_UNION))
        {
          /* NOTE: cagney/2003-10-20: Compatibility hack for legacy
-            code.  Old architectures don't expect STORE_RETURN_VALUE
+            code.  Old architectures don't expect gdbarch_store_return_value
             to be called with with a small struct that needs to be
             stored in registers.  Don't start doing it now.  */
          query_prefix = "\
index 74044088296793e5ab038b0d7c3d6905d52e44d4..52ba2ed90b27d3a6ffa8bf0231ba56bb1afb08a2 100644 (file)
@@ -1654,7 +1654,7 @@ coerce_enum (struct value *arg)
 \f
 
 /* Should we use DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS instead of
-   EXTRACT_RETURN_VALUE?  GCC_P is true if compiled with gcc and TYPE
+   gdbarch_extract_return_value?  GCC_P is true if compiled with gcc and TYPE
    is the type (which is known to be struct, union or array).
 
    On most machines, the struct convention is used unless we are
This page took 0.034044 seconds and 4 git commands to generate.