diff options
author | Richard Earnshaw <richard.earnshaw@arm.com> | 2002-02-04 11:55:36 +0000 |
---|---|---|
committer | Richard Earnshaw <richard.earnshaw@arm.com> | 2002-02-04 11:55:36 +0000 |
commit | 181c1381a54475957d907a7d86948548e17b9c0f (patch) | |
tree | 72c065b37c11ca2d77853a62857bda0ff499ddaf /gdb/gdbarch.c | |
parent | fa4ba8da6c28c972dd1b6b9971e29b51aabaafcc (diff) | |
download | gdb-181c1381a54475957d907a7d86948548e17b9c0f.zip gdb-181c1381a54475957d907a7d86948548e17b9c0f.tar.gz gdb-181c1381a54475957d907a7d86948548e17b9c0f.tar.bz2 |
* gdbarch.sh (copyright): Update years in generated header.
(SMASH_TEXT_ADDRESS): Add rule.
*gdbarch.h, gdbarch.c: Re-generate.
* coffread.c: Multi-arch uses of SMASH_TEXT_ADDRESS.
* dbxread.c: Likewise.
* dwarfread.c: Likewise.
* elfread.c: Likewise.
* somread.c: Likewise.
* arm-tdep.c (arm_smash_text_address): New function.
* config/arm/tm-arm.h (SMASH_TEXT_ADDRESS): Define in terms of above.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 0cc5a36..98da991 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -1,7 +1,7 @@ /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ /* Dynamic architecture support for GDB, the GNU debugger. - Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GDB. @@ -250,6 +250,7 @@ struct gdbarch const struct floatformat * long_double_format; gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr; gdbarch_addr_bits_remove_ftype *addr_bits_remove; + gdbarch_smash_text_address_ftype *smash_text_address; gdbarch_software_single_step_ftype *software_single_step; gdbarch_print_insn_ftype *print_insn; gdbarch_skip_trampoline_code_ftype *skip_trampoline_code; @@ -395,6 +396,7 @@ struct gdbarch startup_gdbarch = 0, 0, 0, + 0, generic_in_function_epilogue_p, construct_inferior_arguments, 0, @@ -505,6 +507,7 @@ gdbarch_alloc (const struct gdbarch_info *info, current_gdbarch->extra_stack_alignment_needed = 1; current_gdbarch->convert_from_func_ptr_addr = core_addr_identity; current_gdbarch->addr_bits_remove = core_addr_identity; + current_gdbarch->smash_text_address = core_addr_identity; current_gdbarch->print_insn = legacy_print_insn; current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code; current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline; @@ -757,6 +760,7 @@ verify_gdbarch (struct gdbarch *gdbarch) gdbarch->long_double_format = &floatformat_unknown; /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */ /* Skip verify of addr_bits_remove, invalid_p == 0 */ + /* Skip verify of smash_text_address, invalid_p == 0 */ /* Skip verify of software_single_step, has predicate */ /* Skip verify of print_insn, invalid_p == 0 */ /* Skip verify of skip_trampoline_code, invalid_p == 0 */ @@ -1742,6 +1746,17 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->skip_trampoline_code /*SKIP_TRAMPOLINE_CODE ()*/); #endif +#ifdef SMASH_TEXT_ADDRESS + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "SMASH_TEXT_ADDRESS(addr)", + XSTRING (SMASH_TEXT_ADDRESS (addr))); + if (GDB_MULTI_ARCH) + fprintf_unfiltered (file, + "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n", + (long) current_gdbarch->smash_text_address + /*SMASH_TEXT_ADDRESS ()*/); +#endif #ifdef SOFTWARE_SINGLE_STEP #if GDB_MULTI_ARCH /* Macro might contain `[{}]' when not multi-arch */ @@ -4215,6 +4230,24 @@ set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch->addr_bits_remove = addr_bits_remove; } +CORE_ADDR +gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr) +{ + if (gdbarch->smash_text_address == 0) + internal_error (__FILE__, __LINE__, + "gdbarch: gdbarch_smash_text_address invalid"); + if (gdbarch_debug >= 2) + fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n"); + return gdbarch->smash_text_address (addr); +} + +void +set_gdbarch_smash_text_address (struct gdbarch *gdbarch, + gdbarch_smash_text_address_ftype smash_text_address) +{ + gdbarch->smash_text_address = smash_text_address; +} + int gdbarch_software_single_step_p (struct gdbarch *gdbarch) { |