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: [commit] Strip DOS drive letter in openp


> Date: Wed, 14 Apr 2010 14:27:45 -0700 (PDT)
> From: dje@google.com (Doug Evans)
> 
> Hi.
> 
> I've checked in this patch which strips a DOS drive spec if present
> before concatenating string with the search path.
> 
> This is in reference to this thread:
> http://sourceware.org/ml/gdb-patches/2010-04/msg00110.html
> and in particular:
> http://sourceware.org/ml/gdb-patches/2010-04/msg00277.html
> 
> 2010-04-14  Doug Evans  <dje@google.com>
> 
> 	* source.c (openp): Strip DOS drive letter if present before
> 	concatenating string to search path.
> 
> Index: source.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/source.c,v
> retrieving revision 1.109
> diff -u -p -r1.109 source.c
> --- source.c	8 Apr 2010 21:08:39 -0000	1.109
> +++ source.c	14 Apr 2010 21:18:59 -0000
> @@ -724,6 +724,10 @@ openp (const char *path, int opts, const
>  	    goto done;
>      }
>  
> +  /* For dos paths, d:/foo -> /foo, and d:foo -> foo.  */
> +  if (HAS_DRIVE_SPEC (string))
> +    string = STRIP_DRIVE_SPEC (string);
> +

Eh, where does HAS_DRIVE_SPEC come from?


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