在GDB中命名断点 [英] Naming breakpoints in GDB

查看:149
本文介绍了在GDB中命名断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在GDB中命名一个断点,所以当它被命中时,GDB会给出一些名称而不是一个数字? (IE命中断点!!! VERYIMPORTANTBREAKPOINT !!!在main()方法中)

解决方案

不,没有办法做这个,但是你可以使用'commands'命令和print命令。



例如

  break main 
命令
print!!!在方法main()中使用VERYIMPORTANTBREAKPOINT !!!

$ <$ $ $ $ $> / pre>

Is there anyway to name a breakpoint in GDB so when it is hit GDB gives some name instead of a number? (IE hit breakpoint !!!VERYIMPORTANTBREAKPOINT!!! in method main())

解决方案

no, there is no way to do this, but you can use the 'commands' command, and the print command.

e.g.

break main
commands
print "!!!VERYIMPORTANTBREAKPOINT!!! in method main()"
end

这篇关于在GDB中命名断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆