设置断点:
b(reak) [filename:]func
b(reak) [filename:]line
r(un)
d(elete) breakpoints
s(tep)
n(ext)
t(break)
finish
cd
pwd
bt
up
down
watch
rwatch
awatch
info watchpoints
directory
在jump之前先设置断点,不然程序它不会停下来,用惯了windows调试器的人可能会不习惯。
j(ump) [-+number]
j(ump) line
gdb [process] [pid]
attach [process] [pid]
detch
info break
info thread
set args
show args
directory
p(rint) [/f] exp
其中/f可以为以下任意一个:
x( 十六进制格式 )
d( 十进制格式 )
u( 十六进制无符号 )
o( 八进制格式 )
t( 二进制格式 )
a( 十六进制格式 )
c( 字符格式 )
f( 浮点数格式 )
p(rint) file::var
p(rint) function::var
p(rint) ayyay@len
p(rint) (type)var
p(rint) (char*)var
转载请注明原文地址: https://ibbs.8miu.com/read-1650211.html