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



> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Eli Zaretskii
> Envoyé?: mercredi 30 mars 2011 21:44
> À?: Pierre Muller
> Cc?: gdb-patches@sourceware.org
> Objet?: 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.

  As said in other emails...
the existing code also didn't care to check for a possible error in
cygwin_conv_path.
But I agree with you that a check should be added,
I just don't really know what to do in case of failure...

Thanks again for the comments.

Pierre


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