aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorRichard Earnshaw <richard.earnshaw@arm.com>2002-02-04 11:55:36 +0000
committerRichard Earnshaw <richard.earnshaw@arm.com>2002-02-04 11:55:36 +0000
commit181c1381a54475957d907a7d86948548e17b9c0f (patch)
tree72c065b37c11ca2d77853a62857bda0ff499ddaf /gdb/gdbarch.h
parentfa4ba8da6c28c972dd1b6b9971e29b51aabaafcc (diff)
downloadgdb-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.h')
-rw-r--r--gdb/gdbarch.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index d3b6170..b90a553 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -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.
@@ -2040,6 +2040,26 @@ extern void set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, gdbarch_addr_
#endif
#endif
+/* It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
+ ADDR_BITS_REMOVE. */
+
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (SMASH_TEXT_ADDRESS)
+#define SMASH_TEXT_ADDRESS(addr) (core_addr_identity (addr))
+#endif
+
+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 (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SMASH_TEXT_ADDRESS)
+#error "Non multi-arch definition of SMASH_TEXT_ADDRESS"
+#endif
+#if GDB_MULTI_ARCH
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SMASH_TEXT_ADDRESS)
+#define SMASH_TEXT_ADDRESS(addr) (gdbarch_smash_text_address (current_gdbarch, addr))
+#endif
+#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 implement it.