diff options
author | Maciej W. Rozycki <macro@codesourcery.com> | 2014-12-12 16:36:10 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@codesourcery.com> | 2014-12-12 16:36:10 +0000 |
commit | f161c17134bdfa5f5e72d7afb7dfccf5599a67e1 (patch) | |
tree | 3a804befa6902f1d33dbac0c4c0a223a61a8b543 /gdb | |
parent | 71c247087cbff23fbbe10333a9e504f3e197c107 (diff) | |
download | gdb-f161c17134bdfa5f5e72d7afb7dfccf5599a67e1.zip gdb-f161c17134bdfa5f5e72d7afb7dfccf5599a67e1.tar.gz gdb-f161c17134bdfa5f5e72d7afb7dfccf5599a67e1.tar.bz2 |
MIPS: Define aliases for MSYMBOL_TARGET_FLAG macros
* mips-tdep.h (MSYMBOL_TARGET_FLAG_MIPS16): New macro.
(MSYMBOL_TARGET_FLAG_MICROMIPS): Likewise.
* mips-tdep.c (mips_elf_make_msymbol_special): Use the new
macros.
(msymbol_is_mips, msymbol_is_mips16, msymbol_is_micromips):
Likewise.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 11 | ||||
-rw-r--r-- | gdb/mips-tdep.h | 4 |
3 files changed, 19 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9b9d176..a54e2c1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2014-12-12 Maciej W. Rozycki <macro@codesourcery.com> + + * mips-tdep.h (MSYMBOL_TARGET_FLAG_MIPS16): New macro. + (MSYMBOL_TARGET_FLAG_MICROMIPS): Likewise. + * mips-tdep.c (mips_elf_make_msymbol_special): Use the new + macros. + (msymbol_is_mips, msymbol_is_mips16, msymbol_is_micromips): + Likewise. + 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com> * completer.c: Include "target.h", "reggroups.h", and diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index 5a5a716..eb99910 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -379,12 +379,12 @@ mips_elf_make_msymbol_special (asymbol * sym, struct minimal_symbol *msym) if (ELF_ST_IS_MICROMIPS (st_other)) { - MSYMBOL_TARGET_FLAG_2 (msym) = 1; + MSYMBOL_TARGET_FLAG_MICROMIPS (msym) = 1; SET_MSYMBOL_VALUE_ADDRESS (msym, MSYMBOL_VALUE_RAW_ADDRESS (msym) | 1); } else if (ELF_ST_IS_MIPS16 (st_other)) { - MSYMBOL_TARGET_FLAG_1 (msym) = 1; + MSYMBOL_TARGET_FLAG_MIPS16 (msym) = 1; SET_MSYMBOL_VALUE_ADDRESS (msym, MSYMBOL_VALUE_RAW_ADDRESS (msym) | 1); } } @@ -394,7 +394,8 @@ mips_elf_make_msymbol_special (asymbol * sym, struct minimal_symbol *msym) static int msymbol_is_mips (struct minimal_symbol *msym) { - return !(MSYMBOL_TARGET_FLAG_1 (msym) | MSYMBOL_TARGET_FLAG_2 (msym)); + return !(MSYMBOL_TARGET_FLAG_MIPS16 (msym) + | MSYMBOL_TARGET_FLAG_MICROMIPS (msym)); } /* Return one iff MSYM refers to MIPS16 code. */ @@ -402,7 +403,7 @@ msymbol_is_mips (struct minimal_symbol *msym) static int msymbol_is_mips16 (struct minimal_symbol *msym) { - return MSYMBOL_TARGET_FLAG_1 (msym); + return MSYMBOL_TARGET_FLAG_MIPS16 (msym); } /* Return one iff MSYM refers to microMIPS code. */ @@ -410,7 +411,7 @@ msymbol_is_mips16 (struct minimal_symbol *msym) static int msymbol_is_micromips (struct minimal_symbol *msym) { - return MSYMBOL_TARGET_FLAG_2 (msym); + return MSYMBOL_TARGET_FLAG_MICROMIPS (msym); } /* Set the ISA bit in the main symbol too, complementing the corresponding diff --git a/gdb/mips-tdep.h b/gdb/mips-tdep.h index b42f2d6..186f158 100644 --- a/gdb/mips-tdep.h +++ b/gdb/mips-tdep.h @@ -48,6 +48,10 @@ enum mips_isa ISA_MICROMIPS }; +/* Corresponding MSYMBOL_TARGET_FLAG aliases. */ +#define MSYMBOL_TARGET_FLAG_MIPS16 MSYMBOL_TARGET_FLAG_1 +#define MSYMBOL_TARGET_FLAG_MICROMIPS MSYMBOL_TARGET_FLAG_2 + /* Return the MIPS ISA's register size. Just a short cut to the BFD architecture's word size. */ extern int mips_isa_regsize (struct gdbarch *gdbarch); |