Message ID | 20240828014916.162446-1-nt8r@protonmail.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces~patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D3043385EC31 for <patchwork@sourceware.org>; Wed, 28 Aug 2024 01:50:32 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-40137.protonmail.ch (mail-40137.protonmail.ch [185.70.40.137]) by sourceware.org (Postfix) with ESMTPS id 3C9AF385EC0F for <gdb-patches@sourceware.org>; Wed, 28 Aug 2024 01:49:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3C9AF385EC0F Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=protonmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3C9AF385EC0F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=185.70.40.137 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724809790; cv=none; b=Js0b9SWXniXepSOFKH/nyjVk9VcQCmNSQQke0tciRgOFbn5UYCKpHRjQvvKiyvPhLJ4OoIeHy50SA/Kjo8oa1c4yy8L6xpYvLksaxMqp4LUSvxTmlBkJPreZUWl+aRVKAI5gnhNRVPvK5bpzFFHJGet/zBbHcxVx6/6B9oNCQxA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1724809790; c=relaxed/simple; bh=4YwcYjf7+CZIekDp49lIp+db7qluQ8bNr8nTwxuB6yc=; h=DKIM-Signature:Date:To:From:Subject:Message-ID:MIME-Version; b=nu4aJZVyTh7NIKXdmYn9muzhMhzS7Bf86EcF0XedWXp0Q1qsLnD2W1y56v70Gy4ayf6Lp3u5Gj0jPSES9ws4Z1WQnmgRJd6YiCg5N+Ft/5cHsY9UtJ+AxqCw5d9eP6Ao8/RgJOA1odY9vPcgn/5b4C2d0EmxbHr9Jk/gR5P9prg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1724809787; x=1725068987; bh=xzOd2FRAw6/Ox6LcDjhxwmqM/WLWBCHw6yZuFykUU9Q=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=belKorSwMSbNYZ834oREAKOzgJvebY4F51DQdDPz2Cxt+H6kW9H0IsO83bI39UWt/ xlnwSMYojUZOYBQjzhYATwPZuLtRquUeIaQF+o1XDNfX0lVk6LMCrMwhW7KFz94OOa UCDS6JpwoDka+y2c1vRVTN3ejwU0lK4r/dYDlwRQYCHgiswwX18GW9nywPZ0yTe8ei E8bu1dHH7H+oEHHIzrLxwDz55kZYryUBydAV+y/KODe2PV4eAqUZfXPZinDpXcsy/2 rO3XAyZGbR3dQfHy8p4QsxstV2+9XtWR9to7MbgTpjphgz3/3UXJtZAIoVeiz531KI D85bBVgtCAxJw== Date: Wed, 28 Aug 2024 01:49:44 +0000 To: gdb-patches@sourceware.org From: Antonio Rische <nt8r@protonmail.com> Cc: Antonio Rische <nt8r@protonmail.com> Subject: [PATCH v2 0/5] Tab complete convenience variables Message-ID: <20240828014916.162446-1-nt8r@protonmail.com> Feedback-ID: 21706885:user:proton X-Pm-Message-ID: 11f8f81e0a90246f60b9206d4c3ac45ee98c50c9 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces~patchwork=sourceware.org@sourceware.org |
Series |
Tab complete convenience variables
|
|
Message
Antonio Rische
Aug. 28, 2024, 1:49 a.m. UTC
Implement tab completion for convenience variables and registers in expressions. This has been something that annoyed me about gdb for years. Antonio Rische (5): gdb: Do not create variables when parsing expressions gdb: Tab complete internalvars in expressions gdb/testsuite: Test completion of convenience variables gdb: Tab-complete registers in expressions gdb/testsuite: Test completion of register names in expressions gdb/ada-exp.h | 12 ++++- gdb/ax-gdb.c | 53 ++++++++++++++++++---- gdb/cli/cli-utils.c | 2 +- gdb/completer.c | 27 +++++++++++ gdb/expop.h | 55 ++++++++++++++++++++++- gdb/parse.c | 7 ++- gdb/testsuite/gdb.base/completion.exp | 64 ++++++++++++++++++++++++--- 7 files changed, 199 insertions(+), 21 deletions(-)
Comments
On 8/27/24 10:49 PM, Antonio Rische wrote: > Implement tab completion for convenience variables and registers in > expressions. This has been something that annoyed me about gdb for > years. > > Antonio Rische (5): > gdb: Do not create variables when parsing expressions > gdb: Tab complete internalvars in expressions > gdb/testsuite: Test completion of convenience variables > gdb: Tab-complete registers in expressions > gdb/testsuite: Test completion of register names in expressions > > gdb/ada-exp.h | 12 ++++- > gdb/ax-gdb.c | 53 ++++++++++++++++++---- > gdb/cli/cli-utils.c | 2 +- > gdb/completer.c | 27 +++++++++++ > gdb/expop.h | 55 ++++++++++++++++++++++- > gdb/parse.c | 7 ++- > gdb/testsuite/gdb.base/completion.exp | 64 ++++++++++++++++++++++++--- > 7 files changed, 199 insertions(+), 21 deletions(-) > Hi! Thanks for the contribution! This is definitely appreciated. I don't understand the completion stuff that you worked on, so I can't review the code in depth, but nothing jumped out to me as an obvious problem. I have 2 small comments on how you chose to split the patches, but it's nothing major. Firstly, we tend to prefer we the test is added along with the feature, so it would be preferable if you merged patches 2 and 3 together, and patches 4 and 5 together. Second, and this is more of a question than a requirement, why did you choose to split internalvar completion and register completion in 2 different patches? Since they both relate to completion of $-prefixed things, and both are relatively simple, I personally don't see much value in splitting, but I recognize I may just be missing something. I have tested your patches in my fedora 40, and I can confirm that it does add completion support and doesn't add any regression, so feel free to add my tag in future versions that don't change the code significantly. Tested-By: Guinevere Larsen <blarsen@redhat.com>
Thanks for the testing! I'll combine the testsuite changes with the commits adding functionality. The only reason for separation of internalvars and registers is to minimize commit size (and that I hadn't looked into how to complete registers originally); there isn't any technical reason it's necessary nor do I have a strong preference there. I'm perfectly happy making this a two-patch series. I do think "gdb: Do not create variables when parsing expressions" should be its own patch though, keeping internal refactoring separate from observable changes in the feature set. Antonio On Friday, August 30th, 2024 at 6:44 PM, Guinevere Larsen <blarsen@redhat.com> wrote: > On 8/27/24 10:49 PM, Antonio Rische wrote: > > > Implement tab completion for convenience variables and registers in > > expressions. This has been something that annoyed me about gdb for > > years. > > > > Antonio Rische (5): > > gdb: Do not create variables when parsing expressions > > gdb: Tab complete internalvars in expressions > > gdb/testsuite: Test completion of convenience variables > > gdb: Tab-complete registers in expressions > > gdb/testsuite: Test completion of register names in expressions > > > > gdb/ada-exp.h | 12 ++++- > > gdb/ax-gdb.c | 53 ++++++++++++++++++---- > > gdb/cli/cli-utils.c | 2 +- > > gdb/completer.c | 27 +++++++++++ > > gdb/expop.h | 55 ++++++++++++++++++++++- > > gdb/parse.c | 7 ++- > > gdb/testsuite/gdb.base/completion.exp | 64 ++++++++++++++++++++++++--- > > 7 files changed, 199 insertions(+), 21 deletions(-) > > Hi! > > Thanks for the contribution! This is definitely appreciated. > > I don't understand the completion stuff that you worked on, so I can't > review the code in depth, but nothing jumped out to me as an obvious > problem. I have 2 small comments on how you chose to split the patches, > but it's nothing major. Firstly, we tend to prefer we the test is added > along with the feature, so it would be preferable if you merged patches > 2 and 3 together, and patches 4 and 5 together. > > Second, and this is more of a question than a requirement, why did you > choose to split internalvar completion and register completion in 2 > different patches? Since they both relate to completion of $-prefixed > things, and both are relatively simple, I personally don't see much > value in splitting, but I recognize I may just be missing something. > > I have tested your patches in my fedora 40, and I can confirm that it > does add completion support and doesn't add any regression, so feel free > to add my tag in future versions that don't change the code > significantly. Tested-By: Guinevere Larsen blarsen@redhat.com > > > -- > Cheers, > Guinevere Larsen > She/Her/Hers