From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32628 invoked by alias); 21 Aug 2014 15:53:04 -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 32616 invoked by uid 89); 21 Aug 2014 15:53:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 21 Aug 2014 15:53:03 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7LFqxl5010183 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 21 Aug 2014 11:52:59 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7LFqv5T028474; Thu, 21 Aug 2014 11:52:58 -0400 Message-ID: <53F615D8.5000901@redhat.com> Date: Thu, 21 Aug 2014 15:53:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Gabriel Krisman Bertazi , gdb-patches@sourceware.org Subject: Re: [PATCH] Fix PR gdb/17035: "show user" doesn't list user-defined commands that have empty bodies. References: <1408515134-31165-1-git-send-email-gabriel@krisman.be> In-Reply-To: <1408515134-31165-1-git-send-email-gabriel@krisman.be> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-08/txt/msg00484.txt.bz2 Hi Gabriel, Thanks for the patch! On 08/20/2014 07:12 AM, Gabriel Krisman Bertazi wrote: > c = lookup_cmd (&comname, cmdlist, "", 0, 1); > - /* c->user_commands would be NULL if it's a python/scheme command. */ > - if (c->class != class_user || !c->user_commands) > - error (_("Not a user command.")); > + if (c->class != class_user) > + error (_("Not a user command.")); Doesn't this mean this reverts part of 7d74f2446, and thus now we'd show python/scheme commands? IIUC 7d74f2446, it looks like gdb.python/py-cmd.exp is missing a test that makes sure "show user" doesn't list the user-defined python command. (hmm, this "show user" vs "help user-defined" difference isn't very intuitive) > --- a/gdb/testsuite/gdb.base/default.exp > +++ b/gdb/testsuite/gdb.base/default.exp > @@ -693,7 +693,7 @@ gdb_test "show prompt" "Gdb's prompt is \"$gdb_prompt \".*" "show prompt" > #test show radix > gdb_test "show radix" "Input and output radices set to decimal 10, hex a, octal 12." "show radix" > #test show user > -gdb_test_no_output "show user" "show user" > +gdb_test "show user" "User command \"user-defined\".*" "show user" > #test show values What is this printing now ? Thanks, Pedro Alves