This is the mail archive of the
mailing list for the GDB project.
Disassembling ARM and Thumb code
- From: Shaun Jackman <sjackman at gmail dot com>
- To: gdb at sources dot redhat dot com
- Date: Thu, 5 May 2005 17:05:56 -0700
- Subject: Disassembling ARM and Thumb code
- Reply-to: Shaun Jackman <sjackman at gmail dot com>
My ARM7TDMI processor is currently in Thumb mode, but the x/i command
dissects the instruction as an ARM instruction. The symbol
rdp_getargvsp is a Thumb symbol added using add-symbol-file [elf
binary here]. What is the command to disassemble a given memory
location as a Thumb instruction?
(gdb) p/x $cpsr
$10 = 0x4000003f
(gdb) x/i $pc
0x20004dc <rdp_getargvsp>: cmpcs r4, #67108864 ; 0x4000000
0x20004e0 <rdp_getargvsp+4>: strmibt r2, [r9], -r0, lsl #8
$ arm-elf-gdb --version
GNU gdb 6.2.1
This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf".