0

This is in reference to an earlier question I asked here. What was not clear from that question is what does logging off do when you run that command. Is it just a 'state' of gdb or does it actually remove gdb.txt. I ask as unlike when we use gdb overwrite logging on, when doing (gdb) set logging off unlike when doing logging on there is no feedback in gdb. Can somebody share/explain.

Just to share this is the sequene of gdb commands I normally use -

$gdb program name 

OR

$gdn PID 
(gdb) set pagination 0 
(gdb) set logging on
(gdb) run 

If and when I remember I do quit the gdb session and use

$ rm -rf gdb.txt

and then start all over again. I do know I could use overwrite on to just overwrite on the existing gdb.txt but still it would be nicer if there was just a way to rm -rf gdb.txt from within gdb. I dunno if gdb allows it.

FWIW gdb is -

$ gdb --version
GNU gdb (Debian 8.2.1-2) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
  • I feel it would be helpful to duplicate the gdb commands into this question, it's clear the sequence of events you're concerned about. – Jeff Schaller May 9 at 20:44
  • I have made much of an attempt. Does that improve the question a bit ? – shirish May 10 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.