I am currently debugging a multi-threaded application in Linux using gdb. I'm getting a lot of noise in the output and am wondering if there is anything I can do to silence it.
I'm getting a lot of these: "[Switching to Thread ~~ (LWP ~~)]"
I have used the 'set print thread-events off', but that only seems to catch the start/stop of the thread.
Does anyone know of a way that I can get gdb to stop showing these Switching thread messages?
I use gdb version 10.
set print thread-events off
Works for me. Links to the documentation.
Does anyone know of a way that I can get gdb to stop showing these Switching thread messages?
There is no good way at present.
If you're desperate, one idea would be to write wrappers for commands like continue
that work by redirecting output to /dev/null
(and then undoing the redirection somewhere, like in a stop hook). This will cause you to miss any other gdb output as well though.
It's worth filing a gdb bug report about this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With