gdb,在文件中的所有函数上设置断点 [英] gdb, set breakpoint on all functions in a file

查看:786
本文介绍了gdb,在文件中的所有函数上设置断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

gdb中是否有一个可以在给定文件中的所有函数上设置断点的命令?
我知道rbreak正则表达式在匹配正则表达式函数中设置断点,但是我的文件没有固定的模式函数。

换句话说,是否有一个命令可以用来设置文件名的断点。这意味着,每当控制进入这个文件,它应该打破?



我个人认为这应该不难在gdb中实现,但只是想知道如果有人有已经这样做了。


来自http://sourceware.org/gdb/download/onlinedocs/gdb/Set-Breaks.html#Set-Breaks


Is there a single command in gdb which can set breakpoints on all the functions in a given file ? I know about rbreak regex which sets breakpoints in matching regular expression functions, but my file doesnt have fixed patterned functions.

In another way, is there a command by which I can set a breakpoint on a filename. Which will mean, whenever control gets inside this file, it should break ?

I personally think this should not be much difficult to implement in gdb, but just wondering if somebody has already done this.

解决方案

(gdb) rbreak file:.

from http://sourceware.org/gdb/download/onlinedocs/gdb/Set-Breaks.html#Set-Breaks

这篇关于gdb,在文件中的所有函数上设置断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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