aboutsummaryrefslogtreecommitdiff
path: root/gdb/config/arm
diff options
context:
space:
mode:
authorRichard Earnshaw <richard.earnshaw@arm.com>2002-02-06 15:21:17 +0000
committerRichard Earnshaw <richard.earnshaw@arm.com>2002-02-06 15:21:17 +0000
commit082fc60dfca102f95d73f123f43060f3f34c0ff6 (patch)
tree5dc04f62e212f398c75d156e497d1ce3866a3016 /gdb/config/arm
parent039c576668f59aa4c66d02f3a31b533b799b11cb (diff)
downloadfsf-binutils-gdb-082fc60dfca102f95d73f123f43060f3f34c0ff6.zip
fsf-binutils-gdb-082fc60dfca102f95d73f123f43060f3f34c0ff6.tar.gz
fsf-binutils-gdb-082fc60dfca102f95d73f123f43060f3f34c0ff6.tar.bz2
* arm-tdep.c: Include elf-bfd.h and coff/internal.h.
(MSYMBOL_SET_SPECIAL, MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): Move defines to here from config/tm-arm.h. (coff_sym_is_thumb): Make static. (arm_elf_make_msymbol_special): New function. (arm_coff_make_msymbol_special): New function. * config/arm/tm-arm.h (MSYMBOL_SET_SPECIAL): Delete definition. (MSYMBOL_IS_SPECIAL, MSYMBOL_SIZE): Likewise. (coff_sym_is_thumb): Delete declaration. (arm_elf_make_msymbol_special): Declare. (arm_coff_make_msymbol_special): Declare. (ELF_MAKE_MSYMBOL_SPECIAL): Call arm_elf_make_msymbol_special. (COFF_MAKE_MSYMBOL_SPECIAL): Call arm_coff_make_msymbol_special.
Diffstat (limited to 'gdb/config/arm')
-rw-r--r--gdb/config/arm/tm-arm.h46
1 files changed, 10 insertions, 36 deletions
diff --git a/gdb/config/arm/tm-arm.h b/gdb/config/arm/tm-arm.h
index 0ff2c33..b203da1 100644
--- a/gdb/config/arm/tm-arm.h
+++ b/gdb/config/arm/tm-arm.h
@@ -409,42 +409,16 @@ void arm_software_single_step (int, int);
CORE_ADDR arm_get_next_pc (CORE_ADDR pc);
-/* Macros for setting and testing a bit in a minimal symbol that marks
- it as Thumb function. The MSB of the minimal symbol's "info" field
- is used for this purpose. This field is already being used to store
- the symbol size, so the assumption is that the symbol size cannot
- exceed 2^31.
-
- COFF_MAKE_MSYMBOL_SPECIAL
- ELF_MAKE_MSYMBOL_SPECIAL
-
- These macros test whether the COFF or ELF symbol corresponds to a
- thumb function, and set a "special" bit in a minimal symbol to
- indicate that it does.
-
- MSYMBOL_SET_SPECIAL Actually sets the "special" bit.
- MSYMBOL_IS_SPECIAL Tests the "special" bit in a minimal symbol.
- MSYMBOL_SIZE Returns the size of the minimal symbol,
- i.e. the "info" field with the "special" bit
- masked out
- */
-
-extern int coff_sym_is_thumb (int val);
-
-#define MSYMBOL_SET_SPECIAL(msym) \
- MSYMBOL_INFO (msym) = (char *) (((long) MSYMBOL_INFO (msym)) | 0x80000000)
-#define MSYMBOL_IS_SPECIAL(msym) \
- (((long) MSYMBOL_INFO (msym) & 0x80000000) != 0)
-#define MSYMBOL_SIZE(msym) \
- ((long) MSYMBOL_INFO (msym) & 0x7fffffff)
-
-/* Thumb symbols are of type STT_LOPROC, (synonymous with STT_ARM_TFUNC) */
-#define ELF_MAKE_MSYMBOL_SPECIAL(sym,msym) \
- { if(ELF_ST_TYPE(((elf_symbol_type *)(sym))->internal_elf_sym.st_info) == STT_LOPROC) \
- MSYMBOL_SET_SPECIAL(msym); }
-
-#define COFF_MAKE_MSYMBOL_SPECIAL(val,msym) \
- { if(coff_sym_is_thumb(val)) MSYMBOL_SET_SPECIAL(msym); }
+
+struct minimal_symbol;
+
+void arm_elf_make_msymbol_special(asymbol *, struct minimal_symbol *);
+#define ELF_MAKE_MSYMBOL_SPECIAL(SYM,MSYM) \
+ arm_elf_make_msymbol_special (SYM, MSYM)
+
+void arm_coff_make_msymbol_special(int, struct minimal_symbol *);
+#define COFF_MAKE_MSYMBOL_SPECIAL(VAL,MSYM) \
+ arm_coff_make_msymbol_special (VAL, MSYM)
/* The first 0x20 bytes are the trap vectors. */
#define LOWEST_PC 0x20