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 ?
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 ?
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.