Getting GDB to save a list of breakpoints

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

    The problem is that setting a breakpoint is context sensitive. What if you have two static functions named foo?

    If you are already debugging one of the modules that defines foo, then GDB will assume you meant that one. But if you just dump "break foo" into a file and then read that file at start-up, it will not be clear which function foo you mean.

提交回复
热议问题