putting breakpoint in a file using “rbreak filename.c:.” doesn't work

前端 未结 2 1960
长发绾君心
长发绾君心 2020-12-11 19:07

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 sugges

2条回答
  •  时光说笑
    2020-12-11 19:47

    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.

提交回复
热议问题