当前位置: 代码迷 >> 综合 >> GDB 项目调试 常用
  详细解决方案

GDB 项目调试 常用

热度:67   发布时间:2023-10-20 21:47:41.0

某一项目下代码文件的打断点

s 步进,进入函数

n 下一步

c 继续

b xxx.cpp:行号 

 

查看断点信息

info breakpoints

info break

ptype 变量

 

清除所有断点

clear

 

查看断点上下文信息

list

 

查看变量

p 变量

 

delete  #删除所有breakpoints,watchpoints和catchpoints
delete bnum #删除断点号为bnum的断点

 

p m_FeedCodes
No symbol "m_FeedCodes" in current context.

查看其他变量:

p 命名空间1::命名空间2::变量

 

多线程调试

bt 查看当前堆栈

#0
#1
#n

f n 切换到该frame

 

  相关解决方案