when you turn on logging in windbg (.logopen), the logging output will include what you have typed on the prompt kd> . but when you turn on logging in gdb (set logging on), only the output of the command will be logged, how to make gdb also echo/log the command in the logging file?
-
1Looks it's not possible (unless you log in terminal): sourceware.org/ml/gdb-patches/2011-09/msg00210.htmldbrank0– dbrank02013-02-26 11:10:52 +00:00Commented Feb 26, 2013 at 11:10
-
thanks for the info. and logging through terminal is ok although not as straightforward. answers.launchpad.net/ubuntu/+source/gnome-terminal/+question/…Dyno Fu– Dyno Fu2013-02-28 06:45:33 +00:00Commented Feb 28, 2013 at 6:45
Add a comment
|
2 Answers
In case you want to log command details in log file, you can set command trace on in gdb along with logging:
set trace-commands on
set logging on
This would produce desired logs !
1 Comment
Dyno Fu
thank! i will mark this as the answer. look into the code and the option is added in gdb 6.6.
this is just to summarize the result, credit should go to dbrank0.
per this thread, patch to implement similar feature is rejected. and alternative options is to log terminal session, see script, and other options.