Re: [RFA] 12843

Eli Zaretskii
2011-08-27T08:45:07Z

> From: Tom Tromey <tromey@redhat.com>
> Cc: gdb-patches@sourceware.org
> Date: Fri, 26 Aug 2011 13:07:34 -0600
>
> My view is that, aside from the drive-letter case, we should require
> funny file names to be quoted.

Agreed.

> 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 :-(

Can we standardize on quoting with ".." instead? If so, DOS file
names will not be a problem, because DOS/Windows filesystems don't
allow the `"' character in file names. Therefore, \" can be safely
interpreted as a literal double quote character.

If we must use '..' style quoting, then how about doubling the ' to
express a literal quote character?

> 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

What about these:

break 'file with spaces.c:function:with:colons'
break 'file with spaces.c':'function:with:colons'

? Do you propose just the latter to be valid?