From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24268 invoked by alias); 17 Apr 2013 12:28:25 -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 24254 invoked by uid 89); 17 Apr 2013 12:28:24 -0000 X-Spam-SWARE-Status: No, score=-4.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 17 Apr 2013 12:28:23 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1USRTJ-0002JO-TV from Muhammad_Bilal@mentor.com ; Wed, 17 Apr 2013 05:28:21 -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, 17 Apr 2013 05:28:21 -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.1.289.1; Wed, 17 Apr 2013 13:28:19 +0100 Message-ID: <516E9561.8090102@codesourcery.com> Date: Wed, 17 Apr 2013 16:49:00 -0000 From: mbilal User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: , CC: , , Subject: Re: [patch] patch for review of PR gdb/10462 References: <516D3B30.6080501@codesourcery.com> <516E67FE.5070301@codesourcery.com> In-Reply-To: <516E67FE.5070301@codesourcery.com> Content-Type: multipart/mixed; boundary="------------000807090500000501000702" X-Virus-Found: No X-SW-Source: 2013-04/txt/msg00529.txt.bz2 --------------000807090500000501000702 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 393 On Wednesday, April 17, 2013 2:40 PM Abid, Hafiz wrote: >I think you can break this line so that it does not go over 80 columns. fixed. On Wednesday, April 17, 2013 4:02 PM Pedro Alves wrote: >How about putting the 'line' tests together? fixed. >I think it'd be good to test the reported case of using = instead of space too. fixed. find attached updated patch. Thanks, -Bilal --------------000807090500000501000702 Content-Type: text/x-patch; name="PR10462.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="PR10462.diff" Content-length: 2568 Index: cli/cli-decode.c =================================================================== RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v retrieving revision 1.118 diff -u -p -r1.118 cli-decode.c --- cli/cli-decode.c 10 Apr 2013 15:11:12 -0000 1.118 +++ cli/cli-decode.c 17 Apr 2013 12:16:37 -0000 @@ -1556,6 +1556,9 @@ lookup_cmd (const char **line, struct cm } else { + if (c->type == set_cmd && **line != '\0' && !isspace (**line)) + error (_("Argument must be preceded by space.")); + /* We've got something. It may still not be what the caller wants (if this command *needs* a subcommand). */ while (**line == ' ' || **line == '\t') Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.15428 diff -u -p -r1.15428 ChangeLog --- ChangeLog 17 Apr 2013 01:02:01 -0000 1.15428 +++ ChangeLog 17 Apr 2013 08:13:56 -0000 @@ -1,3 +1,9 @@ +2013-04-17 Muhammad Bilal + + PR gdb/10462 + * cli/cli-decode.c (lookup_command): Show an error if there is no space + before argument. + 2013-04-17 Yao Qi * top.c (print_gdb_configuration): Print configure-time Index: gdb.base/default.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/default.exp,v retrieving revision 1.64 diff -u -p -r1.64 default.exp --- gdb.base/default.exp 15 Apr 2013 18:09:02 -0000 1.64 +++ gdb.base/default.exp 17 Apr 2013 12:18:38 -0000 @@ -847,6 +847,13 @@ gdb_test "whatis" "The history is empty. gdb_test "where" "No stack." "where" #test x gdb_test "x" "Argument required .starting display address.*" "x" +#test argument must be preceded by space +foreach x {"history file" "solib-search-path" "data-directory"} { + foreach y {"/home/" "." "~/home" "=home"} { + gdb_test "set $x$y" "Argument must be preceded by space." \ + "check space before argument" + } +} gdb_exit Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/testsuite/ChangeLog,v retrieving revision 1.3628 diff -u -p -r1.3628 ChangeLog --- ChangeLog 15 Apr 2013 20:37:36 -0000 1.3628 +++ ChangeLog 17 Apr 2013 08:23:11 -0000 @@ -1,3 +1,8 @@ +2013-04-17 Muhammad Bilal + + PR gdb/10462 + * gdb.base/default.exp: Add test case. + 2013-04-15 Siva Chandra Reddy Add option to link testcases with Pthreads library when --------------000807090500000501000702--