This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: usability: exiting from GDB
- From: John Pye <john dot pye at anu dot edu dot au>
- To: Andrew STUBBS <andrew dot stubbs at st dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 29 Nov 2006 14:26:48 +1100
- Subject: Re: usability: exiting from GDB
- References: <456A79B5.2020505@anu.edu.au> <456AFA30.80508@st.com>
Hi Andrew,
Andrew STUBBS wrote:
> 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.
I think that the 'Quit' message is great. But instead of *suggesting*,
it should ask for confirmation: "Ctrl-C pressed from GDB console. Do you
want to exit? (y or n)". Then this confirmation could be turned off
somewhere in the configuration settings.
>
>> 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.
This suggestion would be great if the Ctrl-C action brought up the "Exit
anyway?" question, as I said above.
Cheers
JP