Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew STUBBS <andrew.stubbs@st.com>
To: John Pye <john.pye@anu.edu.au>
Cc: gdb@sourceware.org
Subject: Re: usability: exiting from GDB
Date: Mon, 27 Nov 2006 14:46:00 -0000	[thread overview]
Message-ID: <456AFA30.80508@st.com> (raw)
In-Reply-To: <456A79B5.2020505@anu.edu.au>

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


  parent reply	other threads:[~2006-11-27 14:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-27  5:38 John Pye
2006-11-27  6:50 ` Eli Zaretskii
2006-11-27  7:43   ` John Pye
2006-11-27 13:42     ` Eli Zaretskii
2006-11-27 13:51 ` Daniel Jacobowitz
2006-11-27 14:46 ` Andrew STUBBS [this message]
2006-11-29  3:27   ` John Pye
2006-11-29  4:50     ` Daniel Jacobowitz
2006-11-29  5:04     ` Joel Brobecker
2006-11-29  7:16       ` John Pye
2006-11-29 13:38         ` Daniel Jacobowitz
2006-11-29 14:12           ` Bob Rossi
2006-11-30  4:01             ` John Pye
2006-11-30  8:32               ` Brian Dessent
2006-11-30 11:58                 ` John Pye
2006-11-30 12:34                   ` Andrew STUBBS
2006-11-30  3:59           ` John Pye
2006-11-30 10:10             ` Andrew STUBBS
2006-11-30 11:51               ` John Pye
2006-11-30 21:49             ` Michael Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=456AFA30.80508@st.com \
    --to=andrew.stubbs@st.com \
    --cc=gdb@sourceware.org \
    --cc=john.pye@anu.edu.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox