From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id C9FBF385840F for ; Wed, 30 Mar 2022 09:04:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C9FBF385840F Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-644-i2_YeRvMPZqJyaEpBVUmhw-1; Wed, 30 Mar 2022 05:04:19 -0400 X-MC-Unique: i2_YeRvMPZqJyaEpBVUmhw-1 Received: by mail-wm1-f69.google.com with SMTP id q186-20020a1c43c3000000b0038ce534d9e2so5821742wma.0 for ; Wed, 30 Mar 2022 02:04:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=hA09E7NaOg6j9AvIzGdzS+bZBNExCgAZzv0hdDeaiD4=; b=YKZA71d1kqRApwcR1jgibVZ23xRTEBVseOIFqWqGEN9XPJT6Dtb63Ai2I/mNT9pcrB r5Yro2fT6lQY8clnT/fX/7vNyquMfBzhkBRGLR8QR5g/kBEjyvTnPcbMkDLzdz+0Cdnk ErmRkMutlg6WTXgxfgYn0BucFrQAfFAUl53dSs1eA4odC6sIcI4+8+hsfr1+tEnFMAUe 4veZEdaaGtQVMp+ssvz8p46kIZ0SabkBkEuS+r2iMf69NHZ0wBx6UB2d+EVVQQ+70Tb0 cnkvADApxZ0f9cfw1e4ZKPDzj4cR4mlvXl8FXfxEkqHJvLcFud+OTrftm7M4iY95iqQ1 YqgQ== X-Gm-Message-State: AOAM532Ps2Jbfswd1rIklBgMmkMrBslosp90tlUvL8ZqaeTnlTjoBJJh 02YzIwwWuwoL0xSYZ8YpIiEh2ydE/83o/w8MUtqeZ1NYdUgx8y+UwxSfnY5Dc/90KCyYWFABD/2 gSR1X7BX0KUzzY0fj1oYWoXBDN3R3SRWZ07uGEh5Z4gEiyfINrbNiYvXezJ0oNmC7QhNgPLhhZg == X-Received: by 2002:a05:6000:3cb:b0:205:7b9d:cade with SMTP id b11-20020a05600003cb00b002057b9dcademr35009833wrg.239.1648631058232; Wed, 30 Mar 2022 02:04:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+AJyv9EhiI54gfB+ruk2F4B7S+RH8OTPp9PHJwKz31oA8+xDhtcK679S0i0tHm+ndiq5R5A== X-Received: by 2002:a05:6000:3cb:b0:205:7b9d:cade with SMTP id b11-20020a05600003cb00b002057b9dcademr35009806wrg.239.1648631057896; Wed, 30 Mar 2022 02:04:17 -0700 (PDT) Received: from localhost (host86-169-131-113.range86-169.btcentralplus.com. [86.169.131.113]) by smtp.gmail.com with ESMTPSA id n23-20020a05600c3b9700b0038b7c4c0803sm4515641wms.30.2022.03.30.02.04.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 02:04:17 -0700 (PDT) From: Andrew Burgess To: Simon Marchi via Gdb-patches , gdb-patches@sourceware.org Cc: Simon Marchi Subject: Re: [PATCH] gdb/testsuite/tui: implement _csi_P proc In-Reply-To: <20220330012411.2993199-1-simon.marchi@efficios.com> References: <20220330012411.2993199-1-simon.marchi@efficios.com> Date: Wed, 30 Mar 2022 10:04:16 +0100 Message-ID: <87ee2jak1b.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Wed, 30 Mar 2022 09:04:29 -0000 Simon Marchi via Gdb-patches writes: > Since commit 3cd522938792 ("Change the pager to a ui_file"), I see these > errors when running gdb.tui/scroll.exp: > > ERROR: invalid command name "_csi_P" > while executing > "::gdb_tcl_unknown _csi_P 2" > ("uplevel" body line 1) > invoked from within > "uplevel 1 ::gdb_tcl_unknown $args" > (procedure "::unknown" line 5) > invoked from within > "_csi_P 2" > ("eval" body line 1) > invoked from within > "eval _csi_$cmd $params" > > It looks like GDB is emitting a CSI that it did not emit before, the > "Delete character" one: > > https://vt100.net/docs/vt510-rm/DCH.html > > Implement it. > > When I added the _csi_P but without an actual implementation, I stopped > seeing the error shown above, but I had a FAIL. After adding the > implementation, the test started passing. > > Note that I did not investigate why GDB was suddenly emitting this CSI, > if it makes sense, or if I'm just papering over the problem. Maybe I should just go ahead and push this: https://sourceware.org/pipermail/gdb-patches/2022-March/186433.html This includes _csi_P, _csi_L, and _csi_S, plus a bug fix in _csi_K. As far as I can tell our _csi_P implementations are equivalent. Thoughts? Thanks, Andrew > > Change-Id: I5bf86b6104d51b0623a26a69df83d1ca9a4851b7 > --- > gdb/testsuite/lib/tuiterm.exp | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp > index 38948015e96..94bb2703889 100644 > --- a/gdb/testsuite/lib/tuiterm.exp > +++ b/gdb/testsuite/lib/tuiterm.exp > @@ -349,6 +349,36 @@ namespace eval Term { > } > } > > + # Delete character. > + # > + # https://vt100.net/docs/vt510-rm/DCH.html > + proc _csi_P {args} { > + set count [_default [lindex $args 0] 1] > + > + _log_cur "Delete character ($count)" { > + variable _cur_row > + variable _cur_col > + variable _chars > + variable _cols > + > + set y $_cur_row > + > + # Move all characters right of the cursor COUNT positions left. > + for {set x $_cur_col} {$x < $_cols} {incr x} { > + set from_x [expr $x + $count] > + > + if { $from_x < $_cols } { > + set c $_chars($from_x,$y) > + } else { > + # Insert blank spaces from the right margin. > + set c " " > + } > + > + set _chars($x,$y) $c > + } > + } > + } > + > # Erase chars. > # > # https://vt100.net/docs/vt510-rm/ECH.html > -- > 2.35.1