I'm aware that we can enable pretty printing in gdb set print pretty
. But is there an unset? I sometimes would like to toggle it. I couldn't find any documentation of it not any answers in Stackoverflow.
For newer versions of gdb ( currently using gdb 9.1 ) this did not work any longer. We have to use:
> disable pretty-printer
See gdb doc
Use
set print pretty off
From documentation:
set print pretty on
Cause GDB to print structures in an indented format with one member per line, like this:$1 = { next = 0x0, flags = { sweet = 1, sour = 1 }, meat = 0x54 "Pork" }
set print pretty off
Cause GDB to print structures in a compact format, like this:$1 = {next = 0x0, flags = {sweet = 1, sour = 1}, \ meat = 0x54 "Pork"}
This is the default format.
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