where does gdb put the log file?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
This starts partially from why doesn't gdb like aliases
Now I put the following arguments -
gdb firefox-esr
(gdb) set logging file my-firefox-esr-1802018.log
(gdb) set pagination 0
(gdb) show logging
Future logs will be written to firefox-esr-020818.log.
Logs will be appended to the log file.
Output will be logged and displayed.
(gdb) run --safe-mode
when it crashed I did -
(gdb) bt
(gdb) thread apply all bt
When it finished showing all the threads and the outputs therein I put
(gdb) quit
But now when I am in /home/shirish I don't see that log file. Should I have given the whole path ?
debian logs gdb
add a comment |Â
up vote
2
down vote
favorite
This starts partially from why doesn't gdb like aliases
Now I put the following arguments -
gdb firefox-esr
(gdb) set logging file my-firefox-esr-1802018.log
(gdb) set pagination 0
(gdb) show logging
Future logs will be written to firefox-esr-020818.log.
Logs will be appended to the log file.
Output will be logged and displayed.
(gdb) run --safe-mode
when it crashed I did -
(gdb) bt
(gdb) thread apply all bt
When it finished showing all the threads and the outputs therein I put
(gdb) quit
But now when I am in /home/shirish I don't see that log file. Should I have given the whole path ?
debian logs gdb
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
This starts partially from why doesn't gdb like aliases
Now I put the following arguments -
gdb firefox-esr
(gdb) set logging file my-firefox-esr-1802018.log
(gdb) set pagination 0
(gdb) show logging
Future logs will be written to firefox-esr-020818.log.
Logs will be appended to the log file.
Output will be logged and displayed.
(gdb) run --safe-mode
when it crashed I did -
(gdb) bt
(gdb) thread apply all bt
When it finished showing all the threads and the outputs therein I put
(gdb) quit
But now when I am in /home/shirish I don't see that log file. Should I have given the whole path ?
debian logs gdb
This starts partially from why doesn't gdb like aliases
Now I put the following arguments -
gdb firefox-esr
(gdb) set logging file my-firefox-esr-1802018.log
(gdb) set pagination 0
(gdb) show logging
Future logs will be written to firefox-esr-020818.log.
Logs will be appended to the log file.
Output will be logged and displayed.
(gdb) run --safe-mode
when it crashed I did -
(gdb) bt
(gdb) thread apply all bt
When it finished showing all the threads and the outputs therein I put
(gdb) quit
But now when I am in /home/shirish I don't see that log file. Should I have given the whole path ?
debian logs gdb
edited Feb 8 at 11:06
Rui F Ribeiro
35k1269113
35k1269113
asked Feb 8 at 10:21
shirish
3,26342273
3,26342273
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
accepted
By default the directive set logging file
in gdb
will write to the current directory.
So, in your example, the log file would be written to the directory where firefox-esr
is located, if the user being used has write rights on that directory.
So the answer is yes, to write the log file in your home directory, you have to give the whole path to set logging file
.
See gdb backtrace to file for an interesting hack to accomplish your actions:
alias bt='echo 0 | gdb -batch-silent -ex "run" -ex "set logging
overwrite on" -ex "set logging file gdb.bt" -ex "set logging on" -ex
"set pagination off" -ex "handle SIG33 pass nostop noprint" -ex "echo
backtrace:n" -ex "backtrace full" -ex "echo nnregisters:n" -ex
"info registers" -ex "echo nncurrent instructions:n" -ex "x/16i
$pc" -ex "echo nnthreads backtrace:n" -ex "thread apply all
backtrace" -ex "set logging off" -ex "quit" --args'
bt $crashing_application
See also Backtraces with Gentoo
add a comment |Â
up vote
0
down vote
The gdb.txt or custom-log-file file will not be created in pwd always, by gdb. It has to be explicitly specified by executing command 'set logging on' in gdb terminal. Only then the output will be logged.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
By default the directive set logging file
in gdb
will write to the current directory.
So, in your example, the log file would be written to the directory where firefox-esr
is located, if the user being used has write rights on that directory.
So the answer is yes, to write the log file in your home directory, you have to give the whole path to set logging file
.
See gdb backtrace to file for an interesting hack to accomplish your actions:
alias bt='echo 0 | gdb -batch-silent -ex "run" -ex "set logging
overwrite on" -ex "set logging file gdb.bt" -ex "set logging on" -ex
"set pagination off" -ex "handle SIG33 pass nostop noprint" -ex "echo
backtrace:n" -ex "backtrace full" -ex "echo nnregisters:n" -ex
"info registers" -ex "echo nncurrent instructions:n" -ex "x/16i
$pc" -ex "echo nnthreads backtrace:n" -ex "thread apply all
backtrace" -ex "set logging off" -ex "quit" --args'
bt $crashing_application
See also Backtraces with Gentoo
add a comment |Â
up vote
4
down vote
accepted
By default the directive set logging file
in gdb
will write to the current directory.
So, in your example, the log file would be written to the directory where firefox-esr
is located, if the user being used has write rights on that directory.
So the answer is yes, to write the log file in your home directory, you have to give the whole path to set logging file
.
See gdb backtrace to file for an interesting hack to accomplish your actions:
alias bt='echo 0 | gdb -batch-silent -ex "run" -ex "set logging
overwrite on" -ex "set logging file gdb.bt" -ex "set logging on" -ex
"set pagination off" -ex "handle SIG33 pass nostop noprint" -ex "echo
backtrace:n" -ex "backtrace full" -ex "echo nnregisters:n" -ex
"info registers" -ex "echo nncurrent instructions:n" -ex "x/16i
$pc" -ex "echo nnthreads backtrace:n" -ex "thread apply all
backtrace" -ex "set logging off" -ex "quit" --args'
bt $crashing_application
See also Backtraces with Gentoo
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
By default the directive set logging file
in gdb
will write to the current directory.
So, in your example, the log file would be written to the directory where firefox-esr
is located, if the user being used has write rights on that directory.
So the answer is yes, to write the log file in your home directory, you have to give the whole path to set logging file
.
See gdb backtrace to file for an interesting hack to accomplish your actions:
alias bt='echo 0 | gdb -batch-silent -ex "run" -ex "set logging
overwrite on" -ex "set logging file gdb.bt" -ex "set logging on" -ex
"set pagination off" -ex "handle SIG33 pass nostop noprint" -ex "echo
backtrace:n" -ex "backtrace full" -ex "echo nnregisters:n" -ex
"info registers" -ex "echo nncurrent instructions:n" -ex "x/16i
$pc" -ex "echo nnthreads backtrace:n" -ex "thread apply all
backtrace" -ex "set logging off" -ex "quit" --args'
bt $crashing_application
See also Backtraces with Gentoo
By default the directive set logging file
in gdb
will write to the current directory.
So, in your example, the log file would be written to the directory where firefox-esr
is located, if the user being used has write rights on that directory.
So the answer is yes, to write the log file in your home directory, you have to give the whole path to set logging file
.
See gdb backtrace to file for an interesting hack to accomplish your actions:
alias bt='echo 0 | gdb -batch-silent -ex "run" -ex "set logging
overwrite on" -ex "set logging file gdb.bt" -ex "set logging on" -ex
"set pagination off" -ex "handle SIG33 pass nostop noprint" -ex "echo
backtrace:n" -ex "backtrace full" -ex "echo nnregisters:n" -ex
"info registers" -ex "echo nncurrent instructions:n" -ex "x/16i
$pc" -ex "echo nnthreads backtrace:n" -ex "thread apply all
backtrace" -ex "set logging off" -ex "quit" --args'
bt $crashing_application
See also Backtraces with Gentoo
edited Feb 8 at 15:11
answered Feb 8 at 10:56
Rui F Ribeiro
35k1269113
35k1269113
add a comment |Â
add a comment |Â
up vote
0
down vote
The gdb.txt or custom-log-file file will not be created in pwd always, by gdb. It has to be explicitly specified by executing command 'set logging on' in gdb terminal. Only then the output will be logged.
add a comment |Â
up vote
0
down vote
The gdb.txt or custom-log-file file will not be created in pwd always, by gdb. It has to be explicitly specified by executing command 'set logging on' in gdb terminal. Only then the output will be logged.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
The gdb.txt or custom-log-file file will not be created in pwd always, by gdb. It has to be explicitly specified by executing command 'set logging on' in gdb terminal. Only then the output will be logged.
The gdb.txt or custom-log-file file will not be created in pwd always, by gdb. It has to be explicitly specified by executing command 'set logging on' in gdb terminal. Only then the output will be logged.
answered Jul 26 at 13:31
Phani
11
11
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f422765%2fwhere-does-gdb-put-the-log-file%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password