From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 1B70F385DC00 for ; Mon, 8 Jun 2020 15:35:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1B70F385DC00 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wr1-x433.google.com with SMTP id x6so17837806wrm.13 for ; Mon, 08 Jun 2020 08:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=vScfH8D1lmAtr0bovXyf+zM8Dor7TTKrtEkNA4+libs=; b=SQznGwZi3rRSDw5x/o2Sdwm03wbbW/qt0etlvPIt21MgaEVvC4YxmV/+qsKVPMO2lx k5rTCoOcdFaEsxadJaakZflRsZgjABulCcxQQ+dFA38UipdmPlNbpQccV2RSX4oRjM+4 K0p0eoSi8YLroy1nEKSAZL9XyE+/jHzrSOsjgk5H3ocFW6QN/9oNBgN/FgoRyKrp+/og YTcI1dl4Q9kjVVNR34/WwwxiHcqYt1nSzbrBlQ/AQP1YSkByk9s2iGMdpJus630uF/bu VTXn4Duh2e+8NPDxpSIZCTecTcleZwjkeHfk8dhPPPKk4YhBwjnwLIisTGeC8pk2wqa2 KHnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=vScfH8D1lmAtr0bovXyf+zM8Dor7TTKrtEkNA4+libs=; b=p2IJXM8GF1bnL00cFM3A4gKQll21d0bk+TaaoGFO0pHhKrpiT1KKJ3cBKoA6sQm/7m 42xUXMk9QoQz0yKQ35X8YSmmCNNF4IIpwoDqIG6G7HicqNZer0W/50FIFjqvWqPSzjek D0+FGehSw5ynWOIBNxlpxCaFVuGimFGwTlvARd9q1uJ/eXgML0RKV9IAchtfl4mVxwdE GSCj2+5VtbaaQbSTcdqdfeAeYqDot06yUov1BiqqRCoUdsRJxLLph1W/MuK+N+ryZ+x9 utzDjjytffrz+A48igYnwcTPPBBgzA2N53KiSopRk/CiiAJPsPrPpuozFDX+mMd42EAg FtUA== X-Gm-Message-State: AOAM530Xg9wi3IRMDNbfsxaKF4nfsc88cHZ7EGD99CI5EpT0Dm6syW+9 xNnks1zeKVGsvRleHVUQINpZkQ9MkPo= X-Google-Smtp-Source: ABdhPJxp0uuZytzPA+o57iWjdPi1ERXtjWInSVR5CufK70P5sX0l2yqrl3SKPnhsUkVTZ6aYEhFVXw== X-Received: by 2002:a5d:608d:: with SMTP id w13mr24050675wrt.298.1591630506140; Mon, 08 Jun 2020 08:35:06 -0700 (PDT) Received: from localhost (host86-128-12-16.range86-128.btcentralplus.com. [86.128.12.16]) by smtp.gmail.com with ESMTPSA id e10sm110364wrn.11.2020.06.08.08.35.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 08:35:05 -0700 (PDT) Date: Mon, 8 Jun 2020 16:35:04 +0100 From: Andrew Burgess To: Hannes Domani Cc: Gdb-patches Subject: Re: [PING^2][PATCH][PR gdb/21690] Fix interruption of command history search Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <1606516834.1835332.1591628330375@mail.yahoo.com> X-Operating-System: Linux/5.6.15-200.fc31.x86_64 (x86_64) X-Uptime: 16:33:12 up 5:40, 1 X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no 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 15:35:08 -0000 * Hannes Domani [2020-06-08 14:58:50 +0000]: > Am Montag, 8. Juni 2020, 16:41:32 MESZ hat Andrew Burgess Folgendes geschrieben: >=20 > > * Hannes Domani via Gdb-patches [2020-06-0= 8 11:51:07 +0000]: > > > > > Ping. > > > > > > Am Freitag, 15. Mai 2020, 11:00:41 MESZ hat Hannes Domani via Gdb-pat= ches Folgendes geschrieben: > > > > > > > Am Samstag, 25. April 2020, 19:17:34 MESZ hat Hannes Domani via Gdb= -patches 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 readlin= e 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: > > > >=A0=A0 (gdb) echo hello\n > >=A0=A0 hello > > > > At this point I start a reverse search, so I type: > > > >=A0=A0 > >=A0=A0 echo > >=A0=A0 > > > > Now I'm left in this situation: > > > >=A0=A0 (gdb) echo hello\n > >=A0=A0=A0=A0=A0=A0=A0=A0 ^ > >=A0=A0=A0=A0=A0=A0=A0=A0 '-- 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? >=20 > This is the behaviour I also see with this patch applied. >=20 >=20 > > Which behaviour do you expect to see? >=20 > 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