Getting GDB to save a list of breakpoints

后端 未结 11 1129
终归单人心
终归单人心 2020-12-04 05:32

OK, info break lists the breakpoints, but not in a format that would work well with reusing them using the --command as in this question. Does GDB have a method for

11条回答
  •  再見小時候
    2020-12-04 05:49

    Any other ideas? I have got

    warning: Current output protocol does not support redirection
    

    after

    set logging on
    

    EDIT:

    I know that question is "how to save a list of breakpoints", however I just discovered, that with GDB we can simply set "saved in file" breakpoints by

    gdb> source breakpoints.txt
    

    where breakpoints.txt is a file like this:

    break main.cpp:25
    break engine.cpp:465
    break wheel.cpp:57
    

提交回复
热议问题