From: John Pye <john.pye@anu.edu.au>
To: Andrew STUBBS <andrew.stubbs@st.com>
Cc: Joel Brobecker <brobecker@adacore.com>, gdb@sourceware.org
Subject: Re: usability: exiting from GDB
Date: Thu, 30 Nov 2006 11:51:00 -0000 [thread overview]
Message-ID: <456EC5C0.3010907@anu.edu.au> (raw)
In-Reply-To: <456EADC6.70403@st.com>
Hi Andrew
Thanks for clarifying. Indeed you are right and the GDB behaviour does
mirror the behaviour of other shells. I hadn't considered the case of
stopped jobs, which I guess *is* analogous.
So the only outcome from my issue was the missing newline when GDB exits.
Thanks all for your comments and feedback.
Cheers
JP
Andrew STUBBS wrote:
> John Pye wrote:
>> The ctrl-D behaviour is what I would prefer, certainly, and this would
>> be more shell-like. But I don't like the confirmation question "Exit
>> anyway?".
>
> It *is* precisely shell like. Try this:
>
> bash$ cat &
> bash$ <Ctrl-D>
>
> bash says:
>
> There are stopped jobs.
>
> [1]+ Stopped cat
>
>> The hook-quit thing does turn off the confirmation in the case of the
>> "q" command, but *does not* work for the ctrl-D exit method.
>
> As advertised.
>
>> I guess the main thing is to get the ctrl-D functionality right.
>> Presuming that others agree that this change would be desirable?
>
> I think everyone is agreed that the Ctrl-D behaviour is precisely the
> same as that of bash and other shells, with the one exception that it
> does not print a line break.
>
>> I find the ctrl-C behaviour unhelpful (ie suggesting I quit instead of
>> asking me if I'd like to go ahead and do it) but it's not important
>> really.
>
> The Ctrl-C behaviour is also only cosmetically different. It's hard to
> see how to explain this any more clearly than has already been done,
> but here goes.
>
> In both cases Ctrl-C interrupts the currently running command:
>
> bash$ cat
> <Ctrl-C>
> bash$
>
> (gdb) continue
> Continuing.
> <Ctrl-C>
>
> Program received signal SIGINT, Interrupt.
> 0xblahblah in ?? ()
> (gdb)
>
> In neither case does it quit the "shell".
>
> When you Ctrl-C a continue command it prints a message explaining
> where the inferior program has stopped.
>
> When you Ctrl-C another GDB command it prints a message 'Quit' to tell
> you that the command exited early, potentially. If no command was
> running then the effect is *only* that you see this message. It is
> *not* any sort of suggestion. If it did not print those four
> characters, 'Quit', the behaviour would be exactly the same as bash.
>
> GDB could certainly improve it's Ctrl-C handling - there a many
> commands that just can't be interrupted - and perhaps the aesthetics
> could also be improved, but in principle it is exactly the same as
> that used by bash.
>
> Hope that explains it for you
>
> Andrew
next prev parent reply other threads:[~2006-11-30 11:51 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
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 [this message]
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=456EC5C0.3010907@anu.edu.au \
--to=john.pye@anu.edu.au \
--cc=andrew.stubbs@st.com \
--cc=brobecker@adacore.com \
--cc=gdb@sourceware.org \
/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