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]

[rfc] [1/6] Replace DEPRECATED_REG_STRUCT_HAS_ADDR


Hello,

this patch replaces DEPRECATED_REG_STRUCT_HAS_ADDR macro by gdbarch_deprecated_reg_struct_has_addr.

ChangeLog:

	* gdbarch.sh (DEPRECATED_REG_STRUCT_HAS_ADDR): Replace by
	gdbarch_deprecated_reg_struct_has_addr.
	* infcall.c (call_function_by_hand): Likewise.
	(DEPRECATED_REG_STRUCT_HAS_ADDR_P): Replace by
	* gdbarch_deprecated_reg_struct_has_addr_p.
	* infcall.c (call_function_by_hand): 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/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:49:11.000000000 +0200
@@ -759,21 +759,9 @@
   fprintf_unfiltered (file,
                       "gdbarch_dump: deprecated_function_start_offset = 0x%s\n",
                       paddr_nz (current_gdbarch->deprecated_function_start_offset));
-#ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "DEPRECATED_REG_STRUCT_HAS_ADDR_P()",
-                      XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: gdbarch_deprecated_reg_struct_has_addr_p() = %d\n",
                       gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch));
-#ifdef DEPRECATED_REG_STRUCT_HAS_ADDR
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)",
-                      XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type)));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: deprecated_reg_struct_has_addr = <0x%lx>\n",
                       (long) current_gdbarch->deprecated_reg_struct_has_addr);
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:49:02.000000000 +0200
@@ -585,33 +585,14 @@
 extern CORE_ADDR gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address);
 extern void set_gdbarch_frame_align (struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align);
 
-/* DEPRECATED_REG_STRUCT_HAS_ADDR has been replaced by
+/* deprecated_reg_struct_has_addr has been replaced by
    stabs_argument_has_addr. */
 
-#if defined (DEPRECATED_REG_STRUCT_HAS_ADDR)
-/* Legacy for systems yet to multi-arch DEPRECATED_REG_STRUCT_HAS_ADDR */
-#if !defined (DEPRECATED_REG_STRUCT_HAS_ADDR_P)
-#define DEPRECATED_REG_STRUCT_HAS_ADDR_P() (1)
-#endif
-#endif
-
 extern int gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch);
-#if !defined (GDB_TM_FILE) && defined (DEPRECATED_REG_STRUCT_HAS_ADDR_P)
-#error "Non multi-arch definition of DEPRECATED_REG_STRUCT_HAS_ADDR"
-#endif
-#if !defined (DEPRECATED_REG_STRUCT_HAS_ADDR_P)
-#define DEPRECATED_REG_STRUCT_HAS_ADDR_P() (gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch))
-#endif
 
 typedef int (gdbarch_deprecated_reg_struct_has_addr_ftype) (int gcc_p, struct type *type);
 extern int gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type);
 extern void set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr);
-#if !defined (GDB_TM_FILE) && defined (DEPRECATED_REG_STRUCT_HAS_ADDR)
-#error "Non multi-arch definition of DEPRECATED_REG_STRUCT_HAS_ADDR"
-#endif
-#if !defined (DEPRECATED_REG_STRUCT_HAS_ADDR)
-#define DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_deprecated_reg_struct_has_addr (current_gdbarch, gcc_p, type))
-#endif
 
 typedef int (gdbarch_stabs_argument_has_addr_ftype) (struct gdbarch *gdbarch, struct type *type);
 extern int gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type);
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:48:26.000000000 +0200
@@ -572,9 +572,9 @@
 F::int:frame_num_args:struct frame_info *frame:frame
 #
 M::CORE_ADDR:frame_align:CORE_ADDR address:address
-# DEPRECATED_REG_STRUCT_HAS_ADDR has been replaced by
+# deprecated_reg_struct_has_addr has been replaced by
 # stabs_argument_has_addr.
-F:=:int:deprecated_reg_struct_has_addr:int gcc_p, struct type *type:gcc_p, type
+F::int:deprecated_reg_struct_has_addr:int gcc_p, struct type *type:gcc_p, type
 m::int:stabs_argument_has_addr:struct type *type:type::default_stabs_argument_has_addr::0
 v::int:frame_red_zone_size
 #
diff -urN src/gdb/infcall.c dev/gdb/infcall.c
--- src/gdb/infcall.c	2007-06-18 05:36:42.000000000 +0200
+++ dev/gdb/infcall.c	2007-06-18 09:52:01.000000000 +0200
@@ -586,7 +586,7 @@
       }
   }
 
-  if (DEPRECATED_REG_STRUCT_HAS_ADDR_P ())
+  if (gdbarch_deprecated_reg_struct_has_addr_p (current_gdbarch))
     {
       int i;
       /* This is a machine like the sparc, where we may need to pass a
@@ -603,7 +603,8 @@
 	       || (TYPE_CODE (arg_type) == TYPE_CODE_FLT
 		   && TYPE_LENGTH (arg_type) > 8)
 	       )
-	      && DEPRECATED_REG_STRUCT_HAS_ADDR (using_gcc, arg_type))
+	      && gdbarch_deprecated_reg_struct_has_addr
+		   (current_gdbarch, using_gcc, arg_type))
 	    {
 	      CORE_ADDR addr;
 	      int len;		/*  = TYPE_LENGTH (arg_type); */


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