Getting GDB to save a list of breakpoints

后端 未结 11 1131
终归单人心
终归单人心 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:58

    Put the following in ~/.gdbinit to define bsave and brestore as GDB commands to save- and restore breakpoints.

    define bsave
        save breakpoints ~/.breakpoints
    end
    
    define brestore
       source ~/.breakpoints
    end
    

提交回复
热议问题