使用“rbreak filename.c:”将断点放入文件中。不起作用 [英] putting breakpoint in a file using "rbreak filename.c:." doesn't work

查看:89
本文介绍了使用“rbreak filename.c:”将断点放入文件中。不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想把断点放在文件的所有功能上。我遇到了这个链接: http://sourceware.org /gdb/download/onlinedocs/gdb/Set-Breaks.html#Set-Breaks



它建议为此使用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

解决方案

rbreak filename.c:.

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.

I want to put breakpoint on all functions of a file.

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:”将断点放入文件中。不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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