From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63334 invoked by alias); 25 Feb 2016 21:23:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 63323 invoked by uid 89); 25 Feb 2016 21:23:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.4 required=5.0 tests=AWL,BAYES_20,SPF_PASS autolearn=ham version=3.3.2 spammy=completion.exp, UD:completion.exp, completionexp, Andrew! X-HELO: mail-io0-f180.google.com Received: from mail-io0-f180.google.com (HELO mail-io0-f180.google.com) (209.85.223.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 25 Feb 2016 21:23:54 +0000 Received: by mail-io0-f180.google.com with SMTP id g203so102450243iof.2 for ; Thu, 25 Feb 2016 13:23:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-transfer-encoding; bh=sklljHcmzyjn12vVle7lnCwE2uBOwrEVmICSU3tlZr4=; b=GlLSOK6JW3puDgaaa7zgEKKuK3qZ5l0xy+auqNKEH2rXHDQC+MetVtYNpLFADvurap k41bpu1qmOlDPItdrA/8DDXoPvwMNBK/3tKx8QYsHCnZQQJzfMUdiOYjM8jlHxbDL6cO UYiwpmhi02jv1mWTElH8UP/7sd1ozUE1+5OUuD31uiMeNvILYNmZwth7vrwi3SJUR5La WhmDHEH1fQn5b6gWf90LBxC/feS5zYTca1UulitOiL0vTx0JjAatl0j524yLU2NqjRiM n31PvST4bB2vi63l3KaWohHKBtoaFsCPe5Ja+LY96uCcb8V+M3bdBKG2gpeRxNN5OpJt gPxQ== X-Gm-Message-State: AG10YOT+OjQHWkW6dgQyavQevY+uITjQaU0aEoCuyX65holDRt0ucXix5ouEA1EUZoryIEI3r3tkllv6l6UE82/8 MIME-Version: 1.0 X-Received: by 10.107.19.213 with SMTP id 82mr5288030iot.6.1456435432909; Thu, 25 Feb 2016 13:23:52 -0800 (PST) Received: by 10.36.5.148 with HTTP; Thu, 25 Feb 2016 13:23:52 -0800 (PST) In-Reply-To: References: <87tx8ks8yv.fsf@fleche.redhat.com> <5384C12C.2020602@broadcom.com> Date: Thu, 25 Feb 2016 21:23:00 -0000 Message-ID: Subject: Re: [PATCH] Add autocompletion for convenience vars in print and set From: Daniel Gutson To: Andrew Burgess Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00833.txt.bz2 (sorry top posting) Has this patch been applied? Thanks, Daniel. On Tue, May 27, 2014 at 5:24 PM, Daniel Gutson wrote: > On Tue, May 27, 2014 at 1:45 PM, Andrew Burgess w= rote: >> On 22/05/2014 4:17 PM, Daniel Gutson wrote: >>> Second version. >>> Comments below: >>> >>> On Tue, May 20, 2014 at 1:36 PM, Tom Tromey wrote: >>>>>>>>> "Daniel" =3D=3D Daniel Gutson writes: >>>> >>>> Daniel> I could not find any testsuite where to add tests for this; if >>>> Daniel> there are, please let me know. >>>> >>>> See testsuite/gdb.base/completion.exp >>> >>> Thanks, I ran all the tests and passed. I did not add a new test >>> case though since I didn't check how to add a new convenience var >>> and undefine it later from the test framework. (Should I try harder?) >> >> I'm not a maintainer, but you'll probably be asked for some tests of >> this (really useful) feature. >> >> I don't think you need to worry about removing any convenience >> variables you create, each .exp test file starts gdb afresh, >> and sometime (look for clean_restart) gdb is restarted within >> a single .exp file. >> >> For this feature you can probably get away with just adding some >> new tests to the end of the completion.exp file, I've included an >> example test in this mail, but you'll probably want some more. >> >> thanks, >> Andrew >> >> >> diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.b= ase/completion.exp >> index 2608309..c028548 100644 >> --- a/gdb/testsuite/gdb.base/completion.exp >> +++ b/gdb/testsuite/gdb.base/completion.exp >> @@ -747,6 +747,27 @@ gdb_test_multiple "" "$test" { >> } >> } >> >> +set test "complete '\$cv_'" >> +gdb_test_no_output "set \$cv_aaa =3D 4" \ >> + "Create convenience variable \$cv_aaa" >> +send_gdb "p \$cv_" >> +gdb_test_multiple "" "$test" { >> + -re "^p \\\$cv_" { >> + send_gdb "\t" >> + gdb_test_multiple "" "$test" { >> + -re "aaa $" { >> + send_gdb "\n" >> + gdb_test_multiple "" "$test" { >> + -re "\\\$\[0-9\]+ =3D 4.*$gdb_prompt $" { >> + pass "$test" >> + } >> + } >> + } >> + } >> + } >> +} >> + >> + >> # Restore globals modified in this test... >> set timeout $oldtimeout1 > > Thanks Andrew! > > > >> >> >> >> > > > > -- > > Daniel F. Gutson > Chief Engineering Officer, SPD > > > San Lorenzo 47, 3rd Floor, Office 5 > > C=C3=B3rdoba, Argentina > > > Phone: +54 351 4217888 / +54 351 4218211 > > Skype: dgutson --=20 Daniel F. Gutson Chief Engineering Officer, SPD San Lorenzo 47, 3rd Floor, Office 5 C=C3=B3rdoba, Argentina Phone: +54 351 4217888 / +54 351 4218211 Skype: dgutson LinkedIn: http://ar.linkedin.com/in/danielgutson