This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC 6/9] Unify windows specifics into common/windows-hdep files
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 30 Mar 2011 21:43:42 +0200
- Subject: Re: [RFC 6/9] Unify windows specifics into common/windows-hdep files
- References: <00b101cbeed2$b5aa4990$20fedcb0$%muller@ics-cnrs.unistra.fr>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> Date: Wed, 30 Mar 2011 14:05:06 +0200
>
> - cygwin_conv_to_win32_path (program, real_path);
> + windows_conv_path (WINDOWS_POSIX_TO_NATIVE_A, program, real_path,
> + MAXPATHLEN);
> program = real_path;
> #endif
>
> @@ -924,11 +929,7 @@ win32_add_one_solib (const char *name, CORE_ADDR
> load_addr)
> }
> #endif
>
> -#ifdef __CYGWIN__
> - cygwin_conv_to_posix_path (buf, buf2);
> -#else
> - strcpy (buf2, buf);
> -#endif
> + windows_conv_path (WINDOWS_NATIVE_A_TO_POSIX, buf, buf2, MAX_PATH + 1);
>
> loaded_dll (buf2, load_addr);
See my other mail: windows_conv_path can fail, but the code does not
check for errors, and bravely used the possibly invalid results.