From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31166 invoked by alias); 30 Mar 2011 21:34:21 -0000 Received: (qmail 31095 invoked by uid 22791); 30 Mar 2011 21:34:18 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT,TW_CP X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Mar 2011 21:32:55 +0000 Received: from md2.u-strasbg.fr (md2.u-strasbg.fr [IPv6:2001:660:2402::187]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id p2ULWnb9035058 ; Wed, 30 Mar 2011 23:32:50 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms2.u-strasbg.fr [130.79.204.11]) by md2.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p2ULWnQm039013 ; Wed, 30 Mar 2011 23:32:49 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p2ULWfNo017625 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Wed, 30 Mar 2011 23:32:49 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Eli Zaretskii'" Cc: References: <00b101cbeed2$b5aa4990$20fedcb0$%muller@ics-cnrs.unistra.fr> <83k4fgqtqp.fsf@gnu.org> In-Reply-To: <83k4fgqtqp.fsf@gnu.org> Subject: RE: [RFC 6/9] Unify windows specifics into common/windows-hdep files Date: Thu, 31 Mar 2011 13:58:00 -0000 Message-ID: <004501cbef22$04b728b0$0e257a10$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg01212.txt.bz2 > -----Message d'origine----- > De=A0: gdb-patches-owner@sourceware.org [mailto:gdb-patches- > owner@sourceware.org] De la part de Eli Zaretskii > Envoy=E9=A0: mercredi 30 mars 2011 21:44 > =C0=A0: Pierre Muller > Cc=A0: gdb-patches@sourceware.org > Objet=A0: Re: [RFC 6/9] Unify windows specifics into common/windows-hdep files >=20 > > From: "Pierre Muller" > > 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 =3D 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); >=20 > 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