问题描述
我想把断点放在文件的所有功能上。我遇到了这个链接:
它建议为此使用rbreak命令。当我使用rbreak时。 ,它可以按预期正常工作,并在prog的所有功能中放置断点。但何时使用
rbreak filename.c:。
这完全不起作用,没有断点放在任何地方。我甚至尝试过这种放置空间的变化:,但即使这样也行不通。
关于如何做到这一点的任何想法?它有可能吗?
任何帮助将不胜感激。
谢谢,
vikas
rbreak filename.c:。
工作。从链接到的文档:
rbreak正则表达式
在所有*函数*上设置与正则表达式正则表达式匹配的断点。
这与位置不同,其中文件名
这是一个不寻常的要求。在我多年的调试中,我从来没有需要这样做。
您必须准备一个列表,并分别设置断点。这样做的配方可以找到。
I want to put breakpoint on all functions of a file. I came across this link : http://sourceware.org/gdb/download/onlinedocs/gdb/Set-Breaks.html#Set-Breaks
It suggest the use of rbreak command for this purpose. When i use "rbreak ." , it works fine as expected and puts breakpoint in all functions of a prog. But when is use
rbreak filename.c:.
This doesn't work at all and no breakpoint is put anywhere. I even tried a variation of this putting spaces around :, but even that doesn't work.
Any idea on how this can be done ? Is it possible at all ?Any help will be greatly appreciated.
thanks,vikas
That isn't supposed to work. From the document you linked to:
rbreak regex
Set breakpoints on all *functions* matching the regular expression regex.
This is different from locations, where filename.c:...
is intended to be used.
This is an unusual request. In my many years of debugging, I've never needed to do that.
You'll have to prepare a list, and set the breakpoints individually. A recipe for doing this can be found here.
这篇关于使用“rbreak filename.c:”将断点放入文件中。不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!