This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [RFC] Fix problems related to Mingw/DJGPP file names containing colons



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]