diff options
author | Tamar Christina <tamar.christina@arm.com> | 2019-03-25 12:14:37 +0000 |
---|---|---|
committer | Tamar Christina <tamar.christina@arm.com> | 2019-03-25 15:05:53 +0000 |
commit | 60df3720d77c8415158f3eaa166e0b7162f9d3b4 (patch) | |
tree | d307eb97175ead9d5331d678314a5e5cf6450a39 /opcodes/aarch64-dis.c | |
parent | AArch64: Fix AArch64 disassembler mapping symbol search (diff) | |
download | binutils-gdb-60df3720d77c8415158f3eaa166e0b7162f9d3b4.tar.gz binutils-gdb-60df3720d77c8415158f3eaa166e0b7162f9d3b4.tar.bz2 binutils-gdb-60df3720d77c8415158f3eaa166e0b7162f9d3b4.zip |
AArch64: Have -D override mapping symbol as documented.
The documentation for -D says that on Arm platforms -D should disassemble
data as instructions.
"If the target is an ARM architecture this switch also has the effect of
forcing the disassembler to decode pieces of data found in code sections
as if they were instructions. "
This makes it do as it says on the tincan so it's more consistent with
aarch32. The usecase here is for baremetal developers who have created
their instructions using .word directives instead if .insn.
Though for Linux users I do find this behavior somewhat non-optimal.
Perhaps there should be a new flag that just disassembles the values
following the actual mapping symbol?
binutils/ChangeLog:
* testsuite/binutils-all/aarch64/in-order-all.d: New test.
* testsuite/binutils-all/aarch64/out-of-order-all.d: New test.
* testsuite/binutils-all/aarch64/out-of-order.d:
opcodes/ChangeLog:
* aarch64-dis.c (print_insn_aarch64):
Implement override.
Diffstat (limited to 'opcodes/aarch64-dis.c')
-rw-r--r-- | opcodes/aarch64-dis.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c index 1f931d09327..eea649fd3cc 100644 --- a/opcodes/aarch64-dis.c +++ b/opcodes/aarch64-dis.c @@ -3433,7 +3433,8 @@ print_insn_aarch64 (bfd_vma pc, else last_type = type; - if (last_type == MAP_DATA) + /* PR 10263: Disassemble data if requested to do so by the user. */ + if (last_type == MAP_DATA && ((info->flags & DISASSEMBLE_DATA) == 0)) { /* size was set above. */ info->bytes_per_chunk = size; |