From: Ulrich Weigand Date: Wed, 6 Jun 2007 15:32:25 +0000 (+0000) Subject: 2007-06-06 Markus Deuling X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=95f1da47fa5763fde40b97db1c75404654b0ebc9;p=binutils-gdb.git 2007-06-06 Markus Deuling * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6743fda3c48..0e866660fa1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +2007-06-06 Markus Deuling + + * 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. + 2007-06-06 Markus Deuling * gdbarch.sh (FRAME_RED_ZONE_SIZE): Replace by diff --git a/gdb/coffread.c b/gdb/coffread.c index 62c221e105c..a9be6f69148 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -931,7 +931,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms, 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 --git a/gdb/elfread.c b/gdb/elfread.c index a80b8f08548..ed217509115 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -410,7 +410,7 @@ elf_symtab_read (struct objfile *objfile, int dynamic, if (msym != NULL) msym->filename = filesymname; #endif - ELF_MAKE_MSYMBOL_SPECIAL (sym, msym); + gdbarch_elf_make_msymbol_special (current_gdbarch, sym, msym); } } } diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 8c6bc5bfd2a..8e8b8e23b1d 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -768,12 +768,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) 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); @@ -930,12 +924,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) 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 --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 467230fdf0d..c399475b01c 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1085,22 +1085,10 @@ extern void set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, g 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 --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 761edb5bc97..d8412e41315 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -651,8 +651,8 @@ m::int:in_function_epilogue_p:CORE_ADDR addr:addr:0:generic_in_function_epilogue # 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 --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index a0907707272..41ffb959cee 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -293,7 +293,7 @@ mips_abi_regsize (struct gdbarch *gdbarch) 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 --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c index da0416e2470..88e1371ec38 100644 --- a/gdb/sh64-tdep.c +++ b/gdb/sh64-tdep.c @@ -206,9 +206,8 @@ sh64_register_name (int reg_nr) 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 */