Getting GDB to save a list of breakpoints

后端 未结 11 1125
终归单人心
终归单人心 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 06:07

    Put your GDB commands and breakpoints in a .gdbinit file just as you might type them at the gdb> prompt, and GDB will automatically load and run them on startup. This is a per-directory file, so you can have different files for different projects.

提交回复
热议问题