3

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?

2

2 Answers 2

4

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 !

Sign up to request clarification or add additional context in comments.

1 Comment

thank! i will mark this as the answer. look into the code and the option is added in gdb 6.6.
1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.