From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24976 invoked by alias); 26 Aug 2011 19:07:54 -0000 Received: (qmail 24965 invoked by uid 22791); 26 Aug 2011 19:07:53 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS 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; Fri, 26 Aug 2011 19:07:36 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7QJ7abX015502 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 26 Aug 2011 15:07:36 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7QJ7aRG023865; Fri, 26 Aug 2011 15:07:36 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p7QJ7Yed025837; Fri, 26 Aug 2011 15:07:35 -0400 From: Tom Tromey To: Keith Seitz Cc: gdb-patches@sourceware.org Subject: Re: [RFA] 12843 References: <4E56C5A0.60802@redhat.com> <4E57E9EC.8060706@redhat.com> Date: Fri, 26 Aug 2011 19:07:00 -0000 In-Reply-To: <4E57E9EC.8060706@redhat.com> (Keith Seitz's message of "Fri, 26 Aug 2011 11:46:04 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 2011-08/txt/msg00506.txt.bz2 Keith> I can play with that a little further. I'll also take the time to add Keith> a bunch of tests to highlight some of the problems. There is an open Keith> PR about this, to. In general the use of ':' or "::" in filenames is Keith> really bad for linespecs. My view is that, aside from the drive-letter case, we should require funny file names to be quoted. That is: Valid: break 'file with spaces.c':73 Invalid: break file with spaces.c:73 Valid: break 'file:with:colons.c':73 Invalid: break file:with:colons.c:73 Valid either way: break c:/file.c:73 break 'c:/file.c':73 I am not sure how to handle file names with quotes; IIUC typical escaping syntax won't work because it is already used in DOS-style file names. This matters since I think MI clients already have to play funny games here :-( (I'd like -break-insert to avoid linespecs completely, which would be a big improvement IMO, but of course we still have to worry about compatibility.) Furthermore I think that quoted text should always be a token: we should not try to extend the token boundaries or break the token up. That is: Valid: break 'file.c':function Invalid: break 'file.c:function' Invalid: break 'file'.c:function I think adopting these rules will make some of my ambiguous linespec changes simpler. Also I think they are reasonably faithful to user expectation; not sure about compatibility, especially for the first rule -- also note that quoting isn't actually documented :-( Also, on irc Keith pointed out PR 12706, which this would fix. Tom