From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28896 invoked by alias); 28 Aug 2013 14:17:32 -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 28886 invoked by uid 89); 28 Aug 2013 14:17:32 -0000 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Aug 2013 14:17:32 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RDNS_NONE,SPF_HELO_FAIL autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1VEgYp-0004nS-3D from Muhammad_Bilal@mentor.com ; Wed, 28 Aug 2013 07:17:27 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 28 Aug 2013 07:17:26 -0700 Received: from [137.202.157.37] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.2.247.3; Wed, 28 Aug 2013 15:17:24 +0100 Message-ID: <521E0673.5080007@codesourcery.com> Date: Wed, 28 Aug 2013 14:17:00 -0000 From: Muhammad Bilal User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Pedro Alves CC: "gdb-patches@sourceware.org" Subject: Re: [patch] fix for checking the command ambiguousness. References: <521C6FDD.3090909@codesourcery.com> <521CEB86.7060106@redhat.com> <521DB1E1.5040804@codesourcery.com> <521DE287.2010208@redhat.com> In-Reply-To: <521DE287.2010208@redhat.com> Content-Type: multipart/mixed; boundary="------------080402050107080508040901" X-SW-Source: 2013-08/txt/msg00828.txt.bz2 --------------080402050107080508040901 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 854 On 08/28/2013 04:44 PM, Pedro Alves wrote: > Hi! > > Unfortunately, I'm having trouble applying your patches. Seems like > they're mangled somehow (line wrapped, etc.). From your email's headers > I see you're using Thunderbird. Could you please go through: > > http://sourceware.org/gdb/wiki/ContributionChecklist#Submitting_patches > > and fix it up as necessary (and then check if you can apply > a patch that you privately send yourself?) > > Thanks, Sorry, for inconvenience Please, find attached file. ./ 2013-07-27 Muhammad Bilal * cli/cli-decode.c (lookup_cmd_composition): Check command ambiguousness with 'nfound' instead of CMD_LIST_AMBIGUOUS. ./testsuite/ 2013-08-28 Muhammad Bilal * gdb.python/py-parameter.exp: Test command ambiguousness. Thanks, -Bilal --------------080402050107080508040901 Content-Type: text/x-patch; name="ambiguity.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ambiguity.patch" Content-length: 1574 Index: cli/cli-decode.c =================================================================== RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v retrieving revision 1.119 diff -u -p -r1.119 cli-decode.c --- cli/cli-decode.c 24 Apr 2013 14:29:17 -0000 1.119 +++ cli/cli-decode.c 28 Aug 2013 14:00:46 -0000 @@ -1729,7 +1729,7 @@ lookup_cmd_composition (const char *text *cmd = find_cmd (command, len, cur_list, 1, &nfound); } - if (*cmd == CMD_LIST_AMBIGUOUS) + if (nfound > 1) { return 0; /* ambiguous */ } Index: testsuite/gdb.python/py-parameter.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-parameter.exp,v retrieving revision 1.8 diff -u -p -r1.8 py-parameter.exp --- testsuite/gdb.python/py-parameter.exp 1 Jan 2013 06:41:26 -0000 1.8 +++ testsuite/gdb.python/py-parameter.exp 28 Aug 2013 14:00:46 -0000 @@ -29,6 +29,13 @@ if { [skip_python_tests] } { continue } # We use "." here instead of ":" so that this works on win32 too. gdb_test "python print (gdb.parameter ('directories'))" "$srcdir/$subdir.\\\$cdir.\\\$cwd" +#Test command ambiguousness +gdb_test "python gdb.parameter('print symbo on')" \ +"Traceback.*File.*line 1.*RuntimeError.*Could not find parameter.*print symbo on.*Error while executing Python code.*" \ +"set print symbo on" +gdb_test "show print symbo" "Ambiguous show print command \"symbo\".*" \ +"show print symbo" + # Test a simple boolean parameter. gdb_py_test_multiple "Simple gdb booleanparameter" \ "python" "" \ --------------080402050107080508040901--