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 6/9] Unify windows specifics into common/windows-hdep files


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


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