I print my temporary strings with this to standard output:
printf "%s", nodeToString(myNode)
but I want to print this string to a file.
I tried solution stated here, but printf results still go to standard output.
Edit: Clarification for cIph3r's answer.
Here what I tried on command line:
$ gdb
(gdb) attach 23053
(gdb) printf "%s", nodeToString(myNode) // This works and outputs to screen
(gdb) run printf "%s", nodeToString(myNode) > outputfile // I get this warning
The program being debugged has been started already.
Start it from the beginning? (y or n)