2

有没有办法遍历我在 GDB 中的所有断点并设置“命令列表”[ http://www.ofb.net/gnu/gdb/gdb_35.html ]?我有大约 100 个断点,我想为每个断点运行一组命令。有谁知道如何做到这一点?谢谢。

4

1 回答 1

2

cond <break-point#> <statement to execute>

你看起来像上面的东西吗?

编辑:

你可以试试断点范围。从上面的链接: -

一些 gdb 命令接受一系列断点来操作。断点范围是单个断点编号,例如5', or two such numbers, in increasing order, separated by a hyphen, like5-7'。当给命令一个断点范围时

于 2012-05-18T15:42:08.087 回答