locals: fix printing of some string buffers
commit481b2fd47b227ceb01f89318d795bac2cfd4d9a2
authorrofl0r <rofl0r@users.noreply.github.com>
Sat, 13 Mar 2021 15:54:46 +0000 (13 15:54 +0000)
committerrofl0r <rofl0r@users.noreply.github.com>
Sat, 13 Mar 2021 15:54:46 +0000 (13 15:54 +0000)
tree6a18ed48880714cd4a368c2081e66b00cf896de2
parent4bc49e74ce0f600b780ff9310e58918a5e538cf6
locals: fix printing of some string buffers

if a char buffer foo contains e.g. "foo\0\0....\x01" gdb's info locals
by default prints

    foo = "foo", '\000' <repeats 23 times>, "\001\000...."

which is quite complex to parse right.

fix it by setting repeat_count_threshold to UINT_MAX-1.
(see gdb/valprint.c in gdb 7.7 sources).

other print options that might be interesting to explore can be examined
via "help set print" inside gdb.
gdb.py