This is the mail archive of the gdb-patches@sources.redhat.com 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]

[PATCH] Multiarch {elf,coff}_make_msymbol_special



I have multiarched these 2 macros, which are defined in the arm code,
because I need them for some upcoming SH patches.

Richard, I have not touched the arm-tdep.c file.

I'll commit this tomorrow, if there are no objections.

Elena

2002-02-04  Elena Zannoni  <ezannoni@redhat.com>

	* gdbarch.sh: Add definitions for COFF_MAKE_MSYMBOL_SPECIAL and
	ELF_MAKE_MSYMBOL_SPECIAL.
	* gdbarch.c, gdbarch.h: Regenerate.
	* arch-utils.c (default_elf_make_msymbol_special, 
        default_coff_make_msymbol_special): New functions.
	* arch-utils.h (default_elf_make_msymbol_special,
        default_coff_make_msymbol_special): Export. 
	* elfread.c (elf_symtab_read): Compile use of
	ELF_MAKE_MSYMBOL_SPECIAL unconditionally because it is now
	multiarched.
	* coffread.c (coff_symtab_read): Ditto, for
	COFF_MAKE_MSYMBOL_SPECIAL.

Index: gdbarch.sh
===================================================================
RCS file: /cvs/uberbaum/gdb/gdbarch.sh,v
retrieving revision 1.106
diff -u -p -r1.106 gdbarch.sh
--- gdbarch.sh	2002/02/04 11:55:34	1.106
+++ gdbarch.sh	2002/02/05 04:01:02
@@ -590,6 +590,8 @@ m:::int:in_function_epilogue_p:CORE_ADDR
 # ARGV is an array of strings, one per argument.
 m::CONSTRUCT_INFERIOR_ARGUMENTS:char *:construct_inferior_arguments:int argc, c
har **argv:argc, argv:::construct_inferior_arguments::0
 F:2:DWARF2_BUILD_FRAME_INFO:void:dwarf2_build_frame_info:struct objfile *objfil
e:objfile:::0
+f:2:ELF_MAKE_MSYMBOL_SPECIAL:void:elf_make_msymbol_special:asymbol *sym, struct
 minimal_symbol *msym:sym, msym:::default_elf_make_msymbol_special::0
+f:2:COFF_MAKE_MSYMBOL_SPECIAL:void:coff_make_msymbol_special:int val, struct mi
nimal_symbol *msym:val, msym:::default_coff_make_msymbol_special::0
 EOF
 }
 
@@ -697,6 +699,7 @@ cat <<EOF
 struct frame_info;
 struct value;
 struct objfile;
+struct minimal_symbol;
 
 extern struct gdbarch *current_gdbarch;
 
Index: arch-utils.h
===================================================================
RCS file: /cvs/uberbaum/gdb/arch-utils.h,v
retrieving revision 1.27
diff -u -p -r1.27 arch-utils.h
--- arch-utils.h	2001/12/19 14:14:52	1.27
+++ arch-utils.h	2002/02/05 04:02:07
@@ -122,6 +122,14 @@ void init_frame_pc_noop (int fromleaf, s
 
 void init_frame_pc_default (int fromleaf, struct frame_info *prev);
 
+/* Do nothing version of elf_make_msymbol_special. */
+
+void default_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym);
+
+/* Do nothing version of coff_make_msymbol_special. */
+
+void default_coff_make_msymbol_special (int val, struct minimal_symbol *msym);
+
 /* Version of cannot_fetch_register() / cannot_store_register() that
    always fails. */

Index: arch-utils.c
===================================================================
RCS file: /cvs/uberbaum/gdb/arch-utils.c,v
retrieving revision 1.48
diff -u -p -r1.48 arch-utils.c
--- arch-utils.c	2002/01/29 03:51:14	1.48
+++ arch-utils.c	2002/02/05 04:02:07
@@ -359,6 +359,18 @@ init_frame_pc_default (int fromleaf, str
     prev->pc = read_pc ();
 }
 
+void
+default_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym)
+{
+  return;
+}
+
+void
+default_coff_make_msymbol_special (int val, struct minimal_symbol *msym)
+{
+  return;
+}
+
 int
 cannot_register_not (int regnum)
 {

Index: elfread.c
===================================================================
RCS file: /cvs/uberbaum/gdb/elfread.c,v
retrieving revision 1.18
diff -u -p -r1.18 elfread.c
--- elfread.c	2001/12/07 12:10:15	1.18
+++ elfread.c	2002/02/05 03:42:49
@@ -518,9 +518,7 @@ elf_symtab_read (struct objfile *objfile
 	      if (msym != NULL)
 		msym->filename = filesymname;
 #endif
-#ifdef ELF_MAKE_MSYMBOL_SPECIAL
 	      ELF_MAKE_MSYMBOL_SPECIAL (sym, msym);
-#endif
 	    }
 	}
       do_cleanups (back_to);
Index: coffread.c
===================================================================
RCS file: /cvs/uberbaum/gdb/coffread.c,v
retrieving revision 1.22
diff -u -p -r1.22 coffread.c
--- coffread.c	2002/01/05 04:30:15	1.22
+++ coffread.c	2002/02/05 03:42:53
@@ -981,10 +981,8 @@ coff_symtab_read (long symtab_offset, un
 		msym = prim_record_minimal_symbol_and_info
 		  (cs->c_name, tmpaddr, ms_type, (void *) (long) cs->c_sclass,
 		   sec, NULL, objfile);
-#ifdef COFF_MAKE_MSYMBOL_SPECIAL
 		if (msym)
 		  COFF_MAKE_MSYMBOL_SPECIAL (cs->c_sclass, msym);
-#endif
 	      }
 	    if (SDB_TYPE (cs->c_type))
 	      {


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