This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: usability: exiting from GDB


John Pye wrote:
What I would like is that (a) the 'ctrl-C' behaviour from the gdb prompt
was changed so that instead of (I think uselessly) outputting 'Quit' and
bringing up another prompt line, it actually *did* quit GDB. Or,

Ctrl-C stops the GDB command that is currently running and, if necessary, stops the program being debugged. It isn't supposed to quit the debugger and, if it did, that would annoy me in exactly the same way you complain about Crtl-D.


If there is no command running then Crtl-C doesn't mean much - maybe the 'Quit' message should be silenced somehow.

alternatively, (b) that the following prompted could somehow be
persistently disabled: "The program is running. Exit anyway? (y or n)".

Put this in your .gdbinit file:


define hook-quit
  set confirm off
end

Obviously this only works if you actually use the quit (or q) command.

I often find that in exiting GDB, which requires ctrl-D to be pressed
twice, I press ctrl-D three times and end up also logging out of my
terminal program, which is annoying.

If I hit my light switch twice the light doesn't stay on. Not helpful, but there it is.


Another issue is that after exiting GDB via ctrl-D-ctrl-D, GDB doesn't
output a newline, which causes the following bash input line to be
messed up.

I expect that could be changed. Care to submit a patch?


Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]