diff options
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 5 | ||||
-rw-r--r-- | opcodes/arm-dis.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 57042a5..3155dcc 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2010-01-06 Daniel Gutson <dgutson@codesourcery.com> + + * arm-dis.c (print_insn): Fixed search for next symbol and data + dumping condition, and the initial mapping symbol state. + 2010-01-05 Doug Evans <dje@sebabeach.org> * cgen-ibld.in: #include "cgen/basic-modes.h". diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index e246fe9..ba16443 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -4355,7 +4355,8 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little) long given; int status; int is_thumb = FALSE; - int is_data = FALSE; + int is_data = (bfd_asymbol_flavour (*info->symtab) + == bfd_target_elf_flavour) ? TRUE : FALSE; int little_code; unsigned int size = 4; void (*printer) (bfd_vma, struct disassemble_info *, long); @@ -4415,7 +4416,7 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little) bfd_vma addr; int n; int last_sym = -1; - enum map_type type = MAP_ARM; + enum map_type type = MAP_DATA; if (pc <= last_mapping_addr) last_mapping_sym = -1; @@ -4478,7 +4479,9 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little) for (n = last_sym + 1; n < info->symtab_size; n++) { addr = bfd_asymbol_value (info->symtab[n]); - if (addr > pc) + if (addr > pc + && (info->section == NULL + || info->section == info->symtab[n]->section)) { if (addr - pc < size) size = addr - pc; |