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] [6/9] Remove macros {ELF,COFF}_MAKE_MSYMBOL_SPECIAL


Hello,

this patch removes ELF_MAKE_MSYMBOL_SPECIAL and COFF_MAKE_MSYMBOL_SPECIAL macros from gdbarch.sh

ChangeLog:

	* gdbarch.sh (COFF_MAKE_MSYMBOL_SPECIAL): Replace by
	gdbarch_coff_make_msymbol_special.
	* coffread.c (coff_symtab_read): Likewise.
	* gdbarch.sh (ELF_MAKE_MSYMBOL_SPECIAL): Replace by
	gdbarch_elf_make_msymbol_special.
	* elfread.c (elf_symtab_read): Likewise.
	* mips-tdep.c (mips_elf_make_msymbol_special): Likewise (comment).
	* sh64-tdep.c (MSYMBOL_IS_SPECIAL): Likewise (comment).
	* gdbarch.c, gdbarch.h: Regenerate.


Is this ok to commit?


Regards,
Markus


--
Markus Deuling
GNU Toolchain for Linux on Cell BE
deuling@de.ibm.com









diff -urN src/gdb/coffread.c dev/gdb/coffread.c
--- src/gdb/coffread.c	2007-01-09 18:58:50.000000000 +0100
+++ dev/gdb/coffread.c	2007-05-22 12:59:01.000000000 +0200
@@ -931,7 +931,8 @@
 
 	    msym = record_minimal_symbol (cs, tmpaddr, ms_type, sec, objfile);
 	    if (msym)
-	      COFF_MAKE_MSYMBOL_SPECIAL (cs->c_sclass, msym);
+	      gdbarch_coff_make_msymbol_special
+	      (current_gdbarch, cs->c_sclass, msym);
 
 	    if (SDB_TYPE (cs->c_type))
 	      {
diff -urN src/gdb/elfread.c dev/gdb/elfread.c
--- src/gdb/elfread.c	2007-03-30 19:21:47.000000000 +0200
+++ dev/gdb/elfread.c	2007-05-22 12:59:49.000000000 +0200
@@ -410,7 +410,7 @@
 	  if (msym != NULL)
 	    msym->filename = filesymname;
 #endif
-	  ELF_MAKE_MSYMBOL_SPECIAL (sym, msym);
+	  gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym);
 	}
     }
 }
diff -urN src/gdb/gdbarch.c dev/gdb/gdbarch.c
--- src/gdb/gdbarch.c	2007-05-14 17:16:57.000000000 +0200
+++ dev/gdb/gdbarch.c	2007-05-22 12:56:39.000000000 +0200
@@ -801,12 +801,6 @@
   fprintf_unfiltered (file,
                       "gdbarch_dump: char_signed = %s\n",
                       paddr_d (current_gdbarch->char_signed));
-#ifdef COFF_MAKE_MSYMBOL_SPECIAL
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
-                      XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: coff_make_msymbol_special = <0x%lx>\n",
                       (long) current_gdbarch->coff_make_msymbol_special);
@@ -963,12 +957,6 @@
   fprintf_unfiltered (file,
                       "gdbarch_dump: ecoff_reg_to_regnum = <0x%lx>\n",
                       (long) current_gdbarch->ecoff_reg_to_regnum);
-#ifdef ELF_MAKE_MSYMBOL_SPECIAL
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
-                      XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: elf_make_msymbol_special = <0x%lx>\n",
                       (long) current_gdbarch->elf_make_msymbol_special);
diff -urN src/gdb/gdbarch.h dev/gdb/gdbarch.h
--- src/gdb/gdbarch.h	2007-05-14 17:16:57.000000000 +0200
+++ dev/gdb/gdbarch.h	2007-05-22 12:56:29.000000000 +0200
@@ -1175,22 +1175,10 @@
 typedef void (gdbarch_elf_make_msymbol_special_ftype) (asymbol *sym, struct minimal_symbol *msym);
 extern void gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym);
 extern void set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special);
-#if !defined (GDB_TM_FILE) && defined (ELF_MAKE_MSYMBOL_SPECIAL)
-#error "Non multi-arch definition of ELF_MAKE_MSYMBOL_SPECIAL"
-#endif
-#if !defined (ELF_MAKE_MSYMBOL_SPECIAL)
-#define ELF_MAKE_MSYMBOL_SPECIAL(sym, msym) (gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym))
-#endif
 
 typedef void (gdbarch_coff_make_msymbol_special_ftype) (int val, struct minimal_symbol *msym);
 extern void gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym);
 extern void set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special);
-#if !defined (GDB_TM_FILE) && defined (COFF_MAKE_MSYMBOL_SPECIAL)
-#error "Non multi-arch definition of COFF_MAKE_MSYMBOL_SPECIAL"
-#endif
-#if !defined (COFF_MAKE_MSYMBOL_SPECIAL)
-#define COFF_MAKE_MSYMBOL_SPECIAL(val, msym) (gdbarch_coff_make_msymbol_special (current_gdbarch, val, msym))
-#endif
 
 extern const char * gdbarch_name_of_malloc (struct gdbarch *gdbarch);
 extern void set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, const char * name_of_malloc);
diff -urN src/gdb/gdbarch.sh dev/gdb/gdbarch.sh
--- src/gdb/gdbarch.sh	2007-05-14 17:16:57.000000000 +0200
+++ dev/gdb/gdbarch.sh	2007-05-22 12:56:17.000000000 +0200
@@ -650,8 +650,8 @@
 # ARGC is the number of elements in the vector.
 # ARGV is an array of strings, one per argument.
 m::char *:construct_inferior_arguments:int argc, char **argv:argc, argv::construct_inferior_arguments::0
-f:=:void:elf_make_msymbol_special:asymbol *sym, struct minimal_symbol *msym:sym, msym::default_elf_make_msymbol_special::0
-f:=:void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym::default_coff_make_msymbol_special::0
+f::void:elf_make_msymbol_special:asymbol *sym, struct minimal_symbol *msym:sym, msym::default_elf_make_msymbol_special::0
+f::void:coff_make_msymbol_special:int val, struct minimal_symbol *msym:val, msym::default_coff_make_msymbol_special::0
 v:=:const char *:name_of_malloc:::"malloc":"malloc"::0:NAME_OF_MALLOC
 v:=:int:cannot_step_breakpoint:::0:0::0
 v:=:int:have_nonsteppable_watchpoint:::0:0::0
diff -urN src/gdb/mips-tdep.c dev/gdb/mips-tdep.c
--- src/gdb/mips-tdep.c	2007-05-17 15:28:55.000000000 +0200
+++ dev/gdb/mips-tdep.c	2007-05-22 13:00:46.000000000 +0200
@@ -293,7 +293,7 @@
    marks it as 16-bit function.  The MSB of the minimal symbol's
    "info" field is used for this purpose.
 
-   ELF_MAKE_MSYMBOL_SPECIAL tests whether an ELF symbol is "special",
+   gdbarch_elf_make_msymbol_special tests whether an ELF symbol is "special",
    i.e. refers to a 16-bit function, and sets a "special" bit in a
    minimal symbol to mark it as a 16-bit function
 
diff -urN src/gdb/sh64-tdep.c dev/gdb/sh64-tdep.c
--- src/gdb/sh64-tdep.c	2007-02-27 21:17:19.000000000 +0100
+++ dev/gdb/sh64-tdep.c	2007-05-22 13:01:13.000000000 +0200
@@ -206,9 +206,8 @@
    symbol that marks it as 32-bit function.  The MSB of the minimal
    symbol's "info" field is used for this purpose.
 
-   ELF_MAKE_MSYMBOL_SPECIAL
-   tests whether an ELF symbol is "special", i.e. refers
-   to a 32-bit function, and sets a "special" bit in a 
+   gdbarch_elf_make_msymbol_special tests whether an ELF symbol is "special",
+   i.e. refers to a 32-bit function, and sets a "special" bit in a
    minimal symbol to mark it as a 32-bit function
    MSYMBOL_IS_SPECIAL   tests the "special" bit in a minimal symbol  */
 



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