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.
This commit is contained in:
Ulrich Weigand 2007-06-12 16:55:32 +00:00
parent c1afe53dd0
commit 260edbc2ca
8 changed files with 31 additions and 25 deletions

View File

@ -1,3 +1,13 @@
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.

View File

@ -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)

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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;