This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] 12843
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