I have a big, long string that I want to capture to a file. I can use logging to get most of the way there:
set logging on set logging file gdb.log
…but if I use p or x/s to print the string, quotes and junk are all escaped. How can I get the string as-is?
For a really large string you can also use:
which can be easily adapted to handle buffers with null bytes. Also the content of FILE would never contain anything other than the string.