gdb, set breakpoint on all functions in a file

后端 未结 2 1930
北海茫月
北海茫月 2020-11-29 05:18

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 expres

相关标签:
2条回答
  • 2020-11-29 05:40
    (gdb) set height 0
    (gdb) rbreak file.cpp:.*
    

    worked fine for me.

    In my case it was useful to shrink the result set a little bit by specifying a template argument for the functions contained in the file:

    (gdb) rbreak file.cpp:.*TemplateClass.*
    
    0 讨论(0)
  • 2020-11-29 05:48
    (gdb) rbreak file:.
    

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

    0 讨论(0)
提交回复
热议问题