+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.
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)
/* 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;
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);
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);
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
# 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
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:
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:
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
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:
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;