From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29685 invoked by alias); 23 Jul 2012 18:04:58 -0000 Received: (qmail 29677 invoked by uid 22791); 23 Jul 2012 18:04:57 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Jul 2012 18:04:44 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6NI4haD030561 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 23 Jul 2012 14:04:43 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q6NI4ewu012569 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 23 Jul 2012 14:04:42 -0400 Message-ID: <500D9238.8010004@redhat.com> Date: Mon, 23 Jul 2012 18:04:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: Tom Tromey CC: Hui Zhu , gdb-patches ml Subject: Re: [PATCH Bug breakpoints/14381] Fix linespec to parse file name that begin with decimal numbers References: <20120722071044.GA8522@host2.jankratochvil.net> <87obn6sge3.fsf@fleche.redhat.com> In-Reply-To: <87obn6sge3.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2012-07/txt/msg00461.txt.bz2 On 07/23/2012 07:26 AM, Tom Tromey wrote: >>>>>> ">" == Hui Zhu writes: > >>> This issue must build test code without dir, for example: "1.c". > > Why is that? > It seems to me that the problem is in the linespec lexer, and that > "break 1.c:5" or whatever ought to work ok. It should also be pretty trivial to add a test for this case, too: --- a/gdb/testsuite/gdb.linespec/ls-errs.exp +++ b/gdb/testsuite/gdb.linespec/ls-errs.exp @@ -124,7 +124,8 @@ foreach x [list "this_file_doesn't_exist.c" \ "'this 'file' has quotes.c'" \ "\"this 'file' has quotes.c\"" \ "\"spaces: and :colons.c\"" \ - "'more: :spaces: :and colons::.c'"] { + "'more: :spaces: :and colons::.c'" \ + "1.c"] { # Remove any quoting from FILENAME for the error message. add the_tests "$x:3" invalid_file [string trim $x \"'] } Keith