Reputation: 15121
I know that I can
gdb
to save my command history to a file, say gdb.history
, by set history filename gdb.history
and set history save on
, and gdb.output
, by set logging file gdb.output
and set logging on
. But how to require gdb
to save both my command line inputs and its responding outputs to the same file, in the order of they occur in that GDB session?
I tried using the same file name in both history and logging command, it does not work, contents of that file will be overwrite by GDB command history when I quit from gdb
.
Upvotes: 1
Views: 598
Reputation: 22549
You can try playing with logging plus "set trace-commands on". I don't know whether that will do what you want though. There's a bug open for this functionality: https://sourceware.org/bugzilla/show_bug.cgi?id=7219. I see I commented on it but I don't remember anything about it any more :)
Upvotes: 1