This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Disassembling ARM and Thumb code


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?

Thanks,
Shaun

(gdb) p/x $cpsr
$10 = 0x4000003f
(gdb) x/i $pc
0x20004dc <rdp_getargvsp>:      cmpcs   r4, #67108864   ; 0x4000000
(gdb)
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".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]