From: Andrew Burgess <andrew.burgess@embecosm.com>
To: Hannes Domani <ssbssa@yahoo.de>
Cc: Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PING^2][PATCH][PR gdb/21690] Fix interruption of command history search
Date: Mon, 8 Jun 2020 16:35:04 +0100 [thread overview]
Message-ID: <20200608153504.GB2737@embecosm.com> (raw)
In-Reply-To: <1606516834.1835332.1591628330375@mail.yahoo.com>
* Hannes Domani <ssbssa@yahoo.de> [2020-06-08 14:58:50 +0000]:
> Am Montag, 8. Juni 2020, 16:41:32 MESZ hat Andrew Burgess <andrew.burgess@embecosm.com> Folgendes geschrieben:
>
> > * Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> [2020-06-08 11:51:07 +0000]:
> >
> > > Ping.
> > >
> > > Am Freitag, 15. Mai 2020, 11:00:41 MESZ hat Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> Folgendes geschrieben:
> > >
> > > > Am Samstag, 25. April 2020, 19:17:34 MESZ hat Hannes Domani via Gdb-patches <gdb-patches@sourceware.org> Folgendes geschrieben:
> > > >
> > > > Ping.
> > > >
> > > > > If you press Ctrl-C during an incremental search of the readline history, the
> > > > > prompt is reset, but readline is still in the incremental search mode.
> > > > >
> > > > > The call of rl_callback_sigcleanup cleans up the internal readline state, and
> > > > > disables the incremental search mode.
> >
> > I didn't look into the implementation of this, but something seems a
> > little odd, though I don't know if this is just my machine setup....
> >
> > I start a GDB session, and do this:
> >
> > (gdb) echo hello\n
> > hello
> >
> > At this point I start a reverse search, so I type:
> >
> > <ctrl+r>
> > echo
> > <ctrl+c>
> >
> > Now I'm left in this situation:
> >
> > (gdb) echo hello\n
> > ^
> > '-- Prompt is here.
> >
> > So, whatever I was in the process of finding when I hit Ctrl+C is left
> > on my prompt line in an editable state.
> >
> > This is different from the behaviour I see in, for example, bash,
> > where when I Ctrl+C the reverse search is aborted and I'm dropped back
> > to an empty prompt.
> >
> > Which behaviour do you see?
>
> This is the behaviour I also see with this patch applied.
>
>
> > Which behaviour do you expect to see?
>
> I didn't compare with anything else, so my expectation was just that it
> shouldn't be in this weird state where the prompt is empty, but readline
> actually thinks it's still in the reverse search.
I think we should end up back at the empty prompt. That certainly
feels more natural after a Ctrl+C (to me anyway).
Thanks,
Andrew
next prev parent reply other threads:[~2020-06-08 15:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <509346577.1585683.1591617067795.ref@mail.yahoo.com>
2020-06-08 11:51 ` Hannes Domani
2020-06-08 14:41 ` Andrew Burgess
2020-06-08 14:58 ` Hannes Domani
2020-06-08 15:35 ` Andrew Burgess [this message]
2020-06-08 17:36 ` Hannes Domani
2020-06-08 19:45 ` Hannes Domani
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=20200608153504.GB2737@embecosm.com \
--to=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
--cc=ssbssa@yahoo.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).