【问题标题】:disable breakpoint hit messages in gdb在 gdb 中禁用断点命中消息
【发布时间】:2019-10-23 18:14:24
【问题描述】:

我正在使用 gdb 调试一个简单的 c++ 循环,我想禁用通知我断点命中的消息。我已经尝试了几个 gdb 标志,例如 -qset verbose off,但没有一个起作用。这是我的 gdb 脚本:

break file.c:27
run
set $i=0
while ($i < 8)
    print counter
    cont
    set $i = $i + 1
end

【问题讨论】:

    标签: gdb breakpoints verbosity


    【解决方案1】:

    原来我错过了以下解决方案:

    break file.c:27
    commands
    silent
    end
    run
    set $i=0
    while ($i < 8)
        print counter
        cont
        set $i = $i + 1
    end
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多