0
votes

I have a simple c++ loop I'm debugging with gdb, and I want to disable the messages informing me of a breakpoint hit. I've tried several gdb flags like -q and set verbose off but none worked. Here is my gdb script:

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

1 Answers

2
votes

Turns out I missed the following solution:

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