This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFC] Fix problems related to Mingw/DJGPP file names containing colons
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Eli Zaretskii'" <eliz at gnu dot org>, "'Tom Tromey'" <tromey at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Sat, 13 Aug 2011 12:10:53 +0200
- Subject: RE: [RFC] Fix problems related to Mingw/DJGPP file names containing colons
- References: <004901cc5907$85006320$8f012960$%muller@ics-cnrs.unistra.fr> <83vcu2wnvj.fsf@gnu.org> <m34o1mlezb.fsf@fleche.redhat.com> <83sjp6wmhb.fsf@gnu.org>
> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Eli Zaretskii
> Envoyé?: vendredi 12 août 2011 19:47
> À?: Tom Tromey
> Cc?: pierre.muller@ics-cnrs.unistra.fr; gdb-patches@sourceware.org
> Objet?: Re: [RFC] Fix problems related to Mingw/DJGPP file names
containing
> colons
>
> > From: Tom Tromey <tromey@redhat.com>
> > Cc: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>,
> > gdb-patches@sourceware.org
> > Date: Fri, 12 Aug 2011 11:24:56 -0600
> >
> > Eli> Thanks for working on this, but I don't like the idea of quoting
file
> > Eli> names internally just to work around this problem.
> >
> > Why?
>
> It's ugly and fragile, because the original name could be quoted.
+ /* Quote filenames containing ':' characters to avoid problems. */
+ if (strchr (filename, ':') != NULL && filename[0] != '"')
+ sprintf (canonical_name, "\"%s\":%d", filename, sal->line);
The second condition already takes care of not
quoting already quoted file names.
Regarding the reverting of
As Keith said, I can solve this problem only by revert this change:
------------------------------
if (!*p
|| p[0] == '\t'
- || ((p[0] == ':')
- && ((p[1] == ':') || (strchr (p + 1, ':') == NULL)))
+ || (p[0] == ':')
This probably creates problems with some C++
cases that use '::' patterns, no?
Pierre