diff options
author | Tristan Gingold <gingold@adacore.com> | 2015-11-20 17:24:52 +0100 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2015-11-23 15:50:29 +0100 |
commit | e49d43ff73a309548dd2b576bb7b602f62be66d6 (patch) | |
tree | d920e151e4fe98cdc4a52484a0117eab3761f98b /opcodes/arm-dis.c | |
parent | aa14fb50785c8ac8be5fbb148d7cdd88fcf8f896 (diff) | |
download | gdb-e49d43ff73a309548dd2b576bb7b602f62be66d6.zip gdb-e49d43ff73a309548dd2b576bb7b602f62be66d6.tar.gz gdb-e49d43ff73a309548dd2b576bb7b602f62be66d6.tar.bz2 |
opcodes: handle mach-o for thumb/arm disambiguation.
opcodes/
* arm-dis.c (print_insn): Also set is_thumb for Mach-O.
Diffstat (limited to 'opcodes/arm-dis.c')
-rw-r--r-- | opcodes/arm-dis.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index 430da08..cff4b3f 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -34,6 +34,7 @@ #include "elf-bfd.h" #include "elf/internal.h" #include "elf/arm.h" +#include "mach-o.h" /* FIXME: Belongs in global header. */ #ifndef strneq @@ -6374,6 +6375,13 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little) == ST_BRANCH_TO_THUMB) || type == STT_ARM_16BIT); } + else if (bfd_asymbol_flavour (*info->symbols) + == bfd_target_mach_o_flavour) + { + bfd_mach_o_asymbol *asym = (bfd_mach_o_asymbol *)*info->symbols; + + is_thumb = (asym->n_desc & BFD_MACH_O_N_ARM_THUMB_DEF); + } } if (force_thumb) |