乐趣区

常用GDB

gdb <program> [core dump]
gdb –pid <pid>
set args <args…>
run
s/step
n (进入函数)
f Continue until the current function re- turns.
c Continue normal execution.

frame
bt
p xx , p (A)pObj1
b xx ; info breakpoints;

汇编
disassem $pc:反汇编当前函数。简写为:disas $pc
si/stepi

多线程、进程
nfo inferiors 进程
info threads / thread n
set scheduler-locking on:只有当前调试线程运行,其他线程处于暂停状态。

退出移动版