[Patch ARM] Prevent disassembler from aborting on an invalid Thumb2 instruction.
Ramana Radhakrishnan
ramana.radhakrishnan@arm.com
Tue Nov 17 10:28:00 GMT 2009
Hi,
Ed Nevill discovered this and proposed the attached patch while debugging some code. The disassembler aborts when faced with an
invalid instruction in Thumb2 state.
The testcase is as simple as the following.
.cpu cortex-a8
.syntax unified
.thumb
.global main
.type main,%function
main:
.inst.w 0xe81c0c20
Without this patch objdump aborts - with this patch objdump prints out something more sensible like :
Disassembly of section .text:
00000000 <main>:
0: e81c 0c20 undefined instruction 0xe81c0c20
Tested cross with arm-none-eabi with no regressions. Ok to commit ?
cheers
Ramana
2009-11-17 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2009-11-13 Edward Nevill <edward.nevill@arm.com>
* arm-dis.c (print_insn_thumb32): Handle undefined instruction.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-dis.patch
Type: text/x-patch
Size: 528 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20091117/b5ffd95e/attachment.bin>
More information about the Binutils
mailing list