This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfc] [3/6] Replace DEPRECATED_USE_STRUCT_CONVENTION
- From: Markus Deuling <deuling at de dot ibm dot com>
- To: GDB Patches <gdb-patches at sourceware dot org>
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Mon, 18 Jun 2007 11:02:22 +0200
- Subject: [rfc] [3/6] Replace DEPRECATED_USE_STRUCT_CONVENTION
Hello,
this patch replaces DEPRECATED_USE_STRUCT_CONVENTION by gdbarch_deprecated_use_struct_convention.
ChangeLog:
* gdbarch.sh (DEPRECATED_USE_STRUCT_CONVENTION): Replace by
gdbarch_deprecated_use_struct_convention.
* arch-utils.c (legacy_return_value): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.
Is this ok to commit ?
--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com
diff -urN src/gdb/arch-utils.c dev/gdb/arch-utils.c
--- src/gdb/arch-utils.c 2007-06-18 05:36:40.000000000 +0200
+++ dev/gdb/arch-utils.c 2007-06-18 09:57:20.000000000 +0200
@@ -54,7 +54,8 @@
int struct_return = ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
|| TYPE_CODE (valtype) == TYPE_CODE_UNION
|| TYPE_CODE (valtype) == TYPE_CODE_ARRAY)
- && DEPRECATED_USE_STRUCT_CONVENTION (0, valtype));
+ && gdbarch_deprecated_use_struct_convention
+ (current_gdbarch, 0, valtype));
if (writebuf != NULL)
{
diff -urN src/gdb/gdbarch.c dev/gdb/gdbarch.c
--- src/gdb/gdbarch.c 2007-06-18 05:36:42.000000000 +0200
+++ dev/gdb/gdbarch.c 2007-06-18 09:56:38.000000000 +0200
@@ -785,12 +785,6 @@
fprintf_unfiltered (file,
"gdbarch_dump: deprecated_register_size = %s\n",
paddr_d (current_gdbarch->deprecated_register_size));
-#ifdef DEPRECATED_USE_STRUCT_CONVENTION
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type)",
- XSTRING (DEPRECATED_USE_STRUCT_CONVENTION (gcc_p, value_type)));
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: deprecated_use_struct_convention = <0x%lx>\n",
(long) current_gdbarch->deprecated_use_struct_convention);
diff -urN src/gdb/gdbarch.h dev/gdb/gdbarch.h
--- src/gdb/gdbarch.h 2007-06-18 05:36:42.000000000 +0200
+++ dev/gdb/gdbarch.h 2007-06-18 09:56:29.000000000 +0200
@@ -418,7 +418,7 @@
/* The deprecated methods EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS and
- DEPRECATED_USE_STRUCT_CONVENTION have all been folded into
+ deprecated_use_struct_convention have all been folded into
RETURN_VALUE. */
typedef void (gdbarch_extract_return_value_ftype) (struct type *type, struct regcache *regcache, gdb_byte *valbuf);
@@ -444,12 +444,6 @@
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);
-#if !defined (GDB_TM_FILE) && defined (DEPRECATED_USE_STRUCT_CONVENTION)
-#error "Non multi-arch definition of DEPRECATED_USE_STRUCT_CONVENTION"
-#endif
-#if !defined (DEPRECATED_USE_STRUCT_CONVENTION)
-#define DEPRECATED_USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_deprecated_use_struct_convention (current_gdbarch, gcc_p, value_type))
-#endif
/* As of 2004-01-17 only the 32-bit SPARC ABI has been identified as an
ABI suitable for the implementation of a robust extract
diff -urN src/gdb/gdbarch.sh dev/gdb/gdbarch.sh
--- src/gdb/gdbarch.sh 2007-06-18 05:36:42.000000000 +0200
+++ dev/gdb/gdbarch.sh 2007-06-18 09:56:23.000000000 +0200
@@ -510,12 +510,12 @@
# The deprecated methods EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE,
# DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS and
-# DEPRECATED_USE_STRUCT_CONVENTION have all been folded into
+# 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:=:int:deprecated_use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type::generic_use_struct_convention::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
# ABI suitable for the implementation of a robust extract