This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: A patch I'd like to propose.
On Wednesday 14 April 2010 15:29:24, Chris Moller wrote:
> On 04/14/10 10:19, Phil Muldoon wrote:
> > On 04/14/2010 12:59 PM, Chris Moller wrote:
> >
> >> Adds the command "quickquit," aliased to "qq," to cli/cli-cmds.c. It
> >> eliminates that annoying quit_confirm() when quitting gdb.
> >>
> >
> > 'set confirm off' works for me? Though this is not the default it
> > seems. Is this orthogonal to your request, or did you want an
> > explicit command to act regardless of confirm off/on?
> >
>
> I'm looking for something that always works without me having to make
> any special arrangement for it. I use a lot of bizarre environments in
> debugging and a lot of the time I've forgotten things like copying over
> my usual~/.gdbinit
That's what you should be fixing then, isn't it? ;-)
define qq
set confirm off
quit
end
Kinda misses the scripting point we add commands for everything
that's _already_ easily possible, even with CLI scripting.
In any case, I'd be okay with this with the following constrains:
* It was rather called "quit-force", or something similarly, so that:
- q<tab> does't stop completing to "quit", but instead even
proposes "quit"/"quit-force" to the user. As bonus, users notice
the new command is available.
- the fact that `qq' is typo-prone is avoided. E.g., "quit-force" -> qf.
* q, qu, qui, remain unambiguous aliases to "quit". "quickquit" shares
3 initials with "quit", so q will stop working if aliases are not added.
* You explain whether you mean for this to disable _all_ queries
when quitting or not. I think that's what you meant. As is, it
doesn't do that, because e.g.,
+void
+quick_quit_command (char *args, int from_tty)
+{
+ disconnect_tracing (from_tty);
^^^^^^^^^^^^^^^^^^
This can query.
+
+ quit_force (args, from_tty);
+}
* Of course, that this is documented in the manual.
--
Pedro Alves