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


> From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> Cc: <gdb-patches@sourceware.org>
> Date: Sat, 13 Aug 2011 12:10:53 +0200
> 
> > 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.

What if the original name already includes quote characters?  That can
happen on Posix platforms.


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