GDB doesn't save log

Viewed 34

I put in ~/.gdbinit

set logging on 
set logging file /mnt/gdb_log.txt

But gdb doesn't save log to this file

Why is that ?

1 Answers

Why is that ?

Because set logging file will only take effect next time you set logging on.

The order of the two statements matters; you should reverse the two lines you have. As-is, the logging is happening, but to $CWD/gdb.txt file, not the one you specified.

Related