This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [commit] Strip DOS drive letter in openp
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: dje at google dot com
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 14 Apr 2010 23:52:32 +0200 (CEST)
- Subject: Re: [commit] Strip DOS drive letter in openp
- References: <20100414212745.75E5B84396@ruffy.mtv.corp.google.com>
> 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?