From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21774 invoked by alias); 29 Aug 2011 07:19:39 -0000 Received: (qmail 21751 invoked by uid 22791); 29 Aug 2011 07:19:37 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.nokia.com (HELO mgw-da02.nokia.com) (147.243.128.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Aug 2011 07:18:55 +0000 Received: from gar.localnet (berwst16747.europe.nokia.com [172.25.167.47]) by mgw-da02.nokia.com (Switch-3.4.4/Switch-3.4.3) with ESMTP id p7T7IrvO025724 for ; Mon, 29 Aug 2011 10:18:53 +0300 From: =?iso-8859-1?q?Andr=E9_P=F6nitz?= To: gdb-patches@sourceware.org Subject: Re: [RFA] 12843 Date: Mon, 29 Aug 2011 07:19:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-30-generic; KDE/4.5.5; i686; ; ) References: <4E56C5A0.60802@redhat.com> <4E57E9EC.8060706@redhat.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <201108290920.40589.andre.poenitz@nokia.com> X-Nokia-AV: Clean 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: 2011-08/txt/msg00556.txt.bz2 On Friday 26 August 2011 21:07:34 ext Tom Tromey wrote: > 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 op= en > Keith> PR about this, to. In general the use of ':' or "::" in filenames = is > Keith> really bad for linespecs. >=20 > My view is that, aside from the drive-letter case, we should require > funny file names to be quoted. That is: >=20 > Valid: break 'file with spaces.c':73 > Invalid: break file with spaces.c:73 >=20 > Valid: break 'file:with:colons.c':73 > Invalid: break file:with:colons.c:73 >=20 > Valid either way: > break c:/file.c:73 > break 'c:/file.c':73 >=20 > 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 :-( Indeed. Something like 25-break-insert -f "\"some thing.cpp\":794" tends to work. I found it non-obvious in the beginning... > (I'd like -break-insert to avoid linespecs completely, which would be a > big improvement IMO, ... >From an MI client's point of view, passing all location information as=20 a single argument is neither wanted nor needed. 25-break-insert --file "some thing.cpp" --line 794 or even require everything to be quoted as in 25-break-insert --file "some thing.cpp" --line "794" would be easier to handle than what's there now. > ... but of course we still have to worry about compatibility.) Just using new flags for the parameters should do the trick in this case. In general, in the past, differences between different versions of gdb have been large enough to require modifications in consumer code anyway (both to take advantage of new features, and to handle incompatibilities in input syntax), so requiring 100% "feature" compatibility _just for the sake of it= _ is unlikely to be helpful. At least I would prefer a syntax with simple, unifo= rm quoting rules over ad-hoc solutions tied to a specific OS or file system. > [...] > I think adopting these rules will make some of my ambiguous linespec > changes simpler.=20 I wonder whether it would be possible to just leave the current syntax unchanged, and introduce a new, better behaved syntax and use some global setting for toggling between them. So everybody concerned about compatibility would not notice a change, and the others would put=20 'set breakpoint syntax 2011' [or whatever] in their .gdbinit and could use the new way. Andre'