gdb) info r
r0 0x161eda00 371120640
r1 0x54eb12 5565202
r2 0x15f53e40 368393792
r3 0x15f00850 368052304
r4 0x161eda00 371120640
r5 0x54eb12 5565202
r6 0x15f53e40 368393792
r7 0x27df5008 668946440
r8 0x15f00850 368052304
r9 0x1623dc90 371448976
r10 0x15da59d0 366631376
r11 0x0 0
r12 0x2ab319 2798361
sp 0x27df4ffc 668946428
lr 0x31418037 826376247
pc 0x2ab31c 2798364
cpsr {
0x60000030,
n = 0x0,
z = 0x1,
c = 0x1,
v = 0x0,
q = 0x0,
j = 0x0,
ge = 0x0,
e = 0x0,
a = 0x0,
i = 0x0,
f = 0x0,
t = 0x1,
mode = 0x10
} {
0x60000030,
n = 0,
z = 1,
c = 1,
v = 0,
q = 0,
j = 0,
ge = 0,
e = 0,
a = 0,
i = 0,
f = 0,
t = 1,
mode = usr
}
网上说用set arm force-mode thumb ,经过实践,只有Android的gdb与gdb_server是有这条命令的,调试IOS的gdb没有.如下
(gdb) set arm force-mode thumb
Undefined set arm command: "force-mode thumb". Try "help set arm".
(gdb) help set arm
Various ARM-specific commands.
List of set arm subcommands:
set arm abi -- Set the ABI
set arm apcs32 -- Set usage of ARM 32-bit mode
set arm disassembler -- Set the disassembly style
set arm fpu -- Set the floating point type
set arm show-opcode-bytes -- Set ARM and Thumb opcode byte display in disassembly
set arm single-step -- Set the ARM stepping mode
Type "help set arm" followed by set arm subcommand name for full documentation.
Command name abbreviations are allowed if unambiguous.