From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sonic301-22.consmr.mail.ir2.yahoo.com (sonic301-22.consmr.mail.ir2.yahoo.com [77.238.176.99]) by sourceware.org (Postfix) with ESMTPS id 7596B385DC00 for ; Mon, 8 Jun 2020 17:36:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7596B385DC00 X-YMail-OSG: mF_0cLAVM1lxunFWScI9krTrcqgZfa7Xgf3.Zk7hWmkJBOrYV.3EZdoimtb.G.1 V8KHNh.itfbm_5usFRnypI0nvuxbUzJo2Hzj_0vYDFB_IMAB9hthRj2p6z_xcVHy5Urqahmo_ve2 e7QjtM.dGklMIgnlEFpD5Oi7sP6tijhPM0Gb7V2xx5O9_7m8OyG8gdCxEl02br4a2SAJyNrtiaIU 2j0_5qTAqsu9uep36v952AMbzUkK5ZahMJy2EuhRr8afzs2tID9T8XvkBuUL6JcgOHRzbmqUuZxW 0iaLF1Q0.jH4C3lR2_ZypVkJ6fiG1uDr732HXVgqcuAIqP5ogOVr8_RbmZMeiUk41Q6aWtgqh4vH xvxiF3bcDpJDGag6ITd8lkDYLwFOcIivBNWYi9COoyPzl_w8DW2Cb9Z9KYVmkQaxMAbZSXJO579v LXB_RqaEetjIOCr.Tc8ZcIKa7GPew22Hs1.T8bzmS8pSkkZvXa_EIqwlq5dUl6NBCeW.peK6WwZo zFquN3LWcRIQjA7JPVMZYYy6zUzxJmnTz4xgvIfSGPY4mOgtApkZNTAAB_vEf4K1dO4C3rYBlg5z w.LD61wQUMfUCDgi1NbsU9DK2F.pgrJ5CBIccL2HM_zkXLeoCfdhsmRKHM37piD3n6.F9ddrS9GK pzkHrvn.pTpQGSqa42xBTjZBT6eyUlO07bTPTSfzmc7Mql0giVIF_jpexEZ_ZSdRlaE.1oCBlw7I .wutqyxp77dCyVjXVllAiBO0pG6xJB91PHwMG_M45GSMpnWVbDcoxpQ8ExkRCdOwLAbfU0NWM92H BZq2zo2.LYrlY3FeSNtNuxY1H6KVwdDsUd3O434XLX_b5Kvbpnn0iLxf30_oKEttr0pXZfptFi8. ByL06MqmnLLPBmbWgk5zUKUWOUGqyPxa2CqAIAT50DhxURN8WDnAotltFZjPiCNXUEelM4H.F6P. EsJOmoHE4X0etRZot59_1.m06F7GuwaBask6MdIis0ZYJbBtGdiWt3lR6jXhWcD7JjnF0VQ6X7uk HzKEPCTrFIhtLPqitkvwLwa3nYcA7Ejrs2Fk9R1H2Z.AHiwFLxeQ_TyIpR7D0T05xKKP8u234EC5 NqGg3bojx3YwTheOkqJkstt7bZtT18b_mFDZjn1hkT20UIfQPxlZ6Zs9sB5hRue0nIOAikReaxz5 2XQtZbOkrEKbnDJCHXrkKdUXDziYsBcnRFdHExt8sxzHCo7hSNAEQz.rQHDcDM4NRZnDnIf5GtHw FVhpaDF1lnCoOCiSfc9.C4u.5ssV4n78v5jfolpD4YX5eWB97ZpPLvZCCkLWl_M0V9DgfOzTkvpJ pHSu.S0JywF7yXrhPGmlgUx0YfDpvBgcecmG0shg- Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ir2.yahoo.com with HTTP; Mon, 8 Jun 2020 17:36:57 +0000 Date: Mon, 8 Jun 2020 17:36:55 +0000 (UTC) From: Hannes Domani To: Andrew Burgess Cc: Gdb-patches Message-ID: <361311042.2032406.1591637815686@mail.yahoo.com> In-Reply-To: <20200608153504.GB2737@embecosm.com> References: <509346577.1585683.1591617067795.ref@mail.yahoo.com> <509346577.1585683.1591617067795@mail.yahoo.com> <20200608144112.GA2737@embecosm.com> <1606516834.1835332.1591628330375@mail.yahoo.com> <20200608153504.GB2737@embecosm.com> Subject: Re: [PING^2][PATCH][PR gdb/21690] Fix interruption of command history search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.16072 YMailNorrin Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0 X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2020 17:36:59 -0000 Am Montag, 8. Juni 2020, 17:36:09 MESZ hat Andrew Burgess Folgendes geschrieben: > * Hannes Domani [2020-06-08 14:58:50 +0000]: > > >=C2=A0 Am Montag, 8. Juni 2020, 16:41:32 MESZ hat Andrew Burgess Folgendes geschrieben: > > > > > * Hannes Domani via Gdb-patches [2020-06= -08 11:51:07 +0000]: > > > > > > > Ping. > > > > > > > > Am Freitag, 15. Mai 2020, 11:00:41 MESZ hat Hannes Domani via Gdb-p= atches Folgendes geschrieben: > > > > > > > > > Am Samstag, 25. April 2020, 19:17:34 MESZ hat Hannes Domani via G= db-patches Folgendes geschrieben: > > > > > > > > > > Ping. > > > > > > > > > > > If you press Ctrl-C during an incremental search of the readlin= e history, the > > > > > > prompt is reset, but readline is still in the incremental searc= h mode. > > > > > > > > > > > > The call of rl_callback_sigcleanup cleans up the internal readl= ine 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: > > > > > >=C2=A0=C2=A0 (gdb) echo hello\n > > >=C2=A0=C2=A0 hello > > > > > > At this point I start a reverse search, so I type: > > > > > >=C2=A0=C2=A0 > > >=C2=A0=C2=A0 echo > > >=C2=A0=C2=A0 > > > > > > Now I'm left in this situation: > > > > > >=C2=A0=C2=A0 (gdb) echo hello\n > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^ > > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 '-- Prompt is here. > > > > > > So, whatever I was in the process of finding when I hit Ctrl+C is lef= t > > > 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 bac= k > > > 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 readlin= e > > actually thinks it's still in the reverse search. > > I think we should end up back at the empty prompt.=C2=A0 That certainly > feels more natural after a Ctrl+C (to me anyway). I tried to implement that, and the best source I could find was this: https://lists.gnu.org/archive/html/bug-readline/2016-04/msg00071.html But I could not figure out a way that also works in TUI mode. How does it work that the line is cleared when not in the reverse-search mo= de? Hannes