diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-12 16:55:32 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-12 16:55:32 +0000 |
commit | 260edbc2caedd55298a64621088983551dfd208c (patch) | |
tree | a7be0a7b754f6be73edb8474d8b4837ec39da3cf | |
parent | c1afe53dd0ad0474a838e84cd0d98f8830c3d9ef (diff) | |
download | gdb-260edbc2caedd55298a64621088983551dfd208c.zip gdb-260edbc2caedd55298a64621088983551dfd208c.tar.gz gdb-260edbc2caedd55298a64621088983551dfd208c.tar.bz2 |
2007-06-12 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (SMASH_TEXT_ADDRESS): Replace by
gdbarch_smash_text_address.
* somread.c (som_symtab_read): Likewise.
* elfread.c (record_minimal_symbol): Likewise.
* dbxread.c (process_one_symbol): Likewise.
* coffread.c (coff_symtab_read): Likewise.
* gdbarch.c, gdbarch.h: Regenerate.
-rw-r--r-- | gdb/ChangeLog | 10 | ||||
-rw-r--r-- | gdb/coffread.c | 3 | ||||
-rw-r--r-- | gdb/dbxread.c | 2 | ||||
-rw-r--r-- | gdb/elfread.c | 2 | ||||
-rw-r--r-- | gdb/gdbarch.c | 6 | ||||
-rw-r--r-- | gdb/gdbarch.h | 8 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 4 | ||||
-rw-r--r-- | gdb/somread.c | 21 |
8 files changed, 31 insertions, 25 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 20960f3..63cf287 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,15 @@ 2007-06-12 Markus Deuling <deuling@de.ibm.com> + * gdbarch.sh (SMASH_TEXT_ADDRESS): Replace by + gdbarch_smash_text_address. + * somread.c (som_symtab_read): Likewise. + * elfread.c (record_minimal_symbol): Likewise. + * dbxread.c (process_one_symbol): Likewise. + * coffread.c (coff_symtab_read): Likewise. + * gdbarch.c, gdbarch.h: Regenerate. + +2007-06-12 Markus Deuling <deuling@de.ibm.com> + * gdbarch.sh (REGISTER_TO_VALUE): Replace by gdbarch_register_to_value. * findvar.c (value_from_register): Likewise. * gdbarch.sh (VALUE_TO_REGISTER): Replace by gdbarch_value_to_register. diff --git a/gdb/coffread.c b/gdb/coffread.c index 5b4e52a..b6f1fea 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -910,7 +910,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms, cs->c_sclass == C_EXT || cs->c_sclass == C_THUMBEXTFUNC || cs->c_sclass == C_THUMBEXT ? mst_text : mst_file_text; - tmpaddr = SMASH_TEXT_ADDRESS (tmpaddr); + tmpaddr = gdbarch_smash_text_address + (current_gdbarch, tmpaddr); } else if (bfd_section->flags & SEC_ALLOC && bfd_section->flags & SEC_LOAD) diff --git a/gdb/dbxread.c b/gdb/dbxread.c index b26d00c..702e315 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -2738,7 +2738,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name, /* Relocate for dynamic loading. */ valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile)); - valu = SMASH_TEXT_ADDRESS (valu); + valu = gdbarch_smash_text_address (current_gdbarch, valu); last_function_start = valu; goto define_a_symbol; diff --git a/gdb/elfread.c b/gdb/elfread.c index ed21750..ea28d7c 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -96,7 +96,7 @@ record_minimal_symbol (char *name, CORE_ADDR address, asection *bfd_section, struct objfile *objfile) { if (ms_type == mst_text || ms_type == mst_file_text) - address = SMASH_TEXT_ADDRESS (address); + address = gdbarch_smash_text_address (current_gdbarch, address); return prim_record_minimal_symbol_and_info (name, address, ms_type, NULL, bfd_section->index, bfd_section, objfile); diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index fa61d9a..bfd1d00 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -1155,12 +1155,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) fprintf_unfiltered (file, "gdbarch_dump: skip_trampoline_code = <0x%lx>\n", (long) current_gdbarch->skip_trampoline_code); -#ifdef SMASH_TEXT_ADDRESS - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "SMASH_TEXT_ADDRESS(addr)", - XSTRING (SMASH_TEXT_ADDRESS (addr))); -#endif fprintf_unfiltered (file, "gdbarch_dump: smash_text_address = <0x%lx>\n", (long) current_gdbarch->smash_text_address); diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index c20696e..b0a6bde 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -756,18 +756,12 @@ typedef CORE_ADDR (gdbarch_addr_bits_remove_ftype) (CORE_ADDR addr); extern CORE_ADDR gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr); extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_bits_remove_ftype *addr_bits_remove); -/* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into +/* It is not at all clear why gdbarch_smash_text_address is not folded into gdbarch_addr_bits_remove. */ typedef CORE_ADDR (gdbarch_smash_text_address_ftype) (CORE_ADDR addr); extern CORE_ADDR gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr); extern void set_gdbarch_smash_text_address (struct gdbarch *gdbarch, gdbarch_smash_text_address_ftype *smash_text_address); -#if !defined (GDB_TM_FILE) && defined (SMASH_TEXT_ADDRESS) -#error "Non multi-arch definition of SMASH_TEXT_ADDRESS" -#endif -#if !defined (SMASH_TEXT_ADDRESS) -#define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr)) -#endif /* FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if the target needs software single step. An ISA method to diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 7440cd3..425c32c 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -596,9 +596,9 @@ m::CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR addr, struct target_ops *targ: # sort of generic thing to handle alignment or segmentation (it's # possible it should be in TARGET_READ_PC instead). f::CORE_ADDR:addr_bits_remove:CORE_ADDR addr:addr::core_addr_identity::0 -# It is not at all clear why SMASH_TEXT_ADDRESS is not folded into +# It is not at all clear why gdbarch_smash_text_address is not folded into # gdbarch_addr_bits_remove. -f:=:CORE_ADDR:smash_text_address:CORE_ADDR addr:addr::core_addr_identity::0 +f::CORE_ADDR:smash_text_address:CORE_ADDR addr:addr::core_addr_identity::0 # FIXME/cagney/2001-01-18: This should be split in two. A target method that # indicates if the target needs software single step. An ISA method to diff --git a/gdb/somread.c b/gdb/somread.c index 7f31303..c4f0744 100644 --- a/gdb/somread.c +++ b/gdb/somread.c @@ -133,7 +133,8 @@ som_symtab_read (bfd *abfd, struct objfile *objfile, symname = bufp->name.n_strx + stringtab; ms_type = mst_text; bufp->symbol_value += text_offset; - bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value); + bufp->symbol_value = gdbarch_smash_text_address + (current_gdbarch, bufp->symbol_value); break; case ST_ENTRY: @@ -146,14 +147,16 @@ som_symtab_read (bfd *abfd, struct objfile *objfile, else ms_type = mst_text; bufp->symbol_value += text_offset; - bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value); + bufp->symbol_value = gdbarch_smash_text_address + (current_gdbarch, bufp->symbol_value); break; case ST_STUB: symname = bufp->name.n_strx + stringtab; ms_type = mst_solib_trampoline; bufp->symbol_value += text_offset; - bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value); + bufp->symbol_value = gdbarch_smash_text_address + (current_gdbarch, bufp->symbol_value); break; case ST_DATA: @@ -181,7 +184,8 @@ som_symtab_read (bfd *abfd, struct objfile *objfile, symname = bufp->name.n_strx + stringtab; ms_type = mst_file_text; bufp->symbol_value += text_offset; - bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value); + bufp->symbol_value = gdbarch_smash_text_address + (current_gdbarch, bufp->symbol_value); check_strange_names: /* Utah GCC 2.5, FSF GCC 2.6 and later generate correct local @@ -212,7 +216,8 @@ som_symtab_read (bfd *abfd, struct objfile *objfile, symname = bufp->name.n_strx + stringtab; ms_type = mst_file_text; bufp->symbol_value += text_offset; - bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value); + bufp->symbol_value = gdbarch_smash_text_address + (current_gdbarch, bufp->symbol_value); break; case ST_ENTRY: @@ -223,14 +228,16 @@ som_symtab_read (bfd *abfd, struct objfile *objfile, we do for SS_UNIVERSAL and SS_EXTERNAL symbols above. */ ms_type = mst_file_text; bufp->symbol_value += text_offset; - bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value); + bufp->symbol_value = gdbarch_smash_text_address + (current_gdbarch, bufp->symbol_value); break; case ST_STUB: symname = bufp->name.n_strx + stringtab; ms_type = mst_solib_trampoline; bufp->symbol_value += text_offset; - bufp->symbol_value = SMASH_TEXT_ADDRESS (bufp->symbol_value); + bufp->symbol_value = gdbarch_smash_text_address + (current_gdbarch, bufp->symbol_value); break; |