From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21543 invoked by alias); 30 Mar 2011 12:15:23 -0000 Received: (qmail 21124 invoked by uid 22791); 30 Mar 2011 12:15:16 -0000 X-SWARE-Spam-Status: No, hits=-1.4 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.153) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Mar 2011 12:15:12 +0000 Received: from md2.u-strasbg.fr (md2.u-strasbg.fr [130.79.200.187]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id p2UCFAuH055182 for ; Wed, 30 Mar 2011 14:15:10 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms4.u-strasbg.fr [130.79.204.13]) by md2.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p2UC58Df021055 for ; Wed, 30 Mar 2011 14:05:08 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id p2UC57dL050334 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 30 Mar 2011 14:05:07 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: Subject: [RFC 6/9] Unify windows specifics into common/windows-hdep files Date: Wed, 30 Mar 2011 12:15:00 -0000 Message-ID: <00b101cbeed2$b5aa4990$20fedcb0$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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/msg01198.txt.bz2 Patch that adapts gdbserver win32-low.c source code to new windows-hdep code. Pierre Muller GDB pascal language maintainer gdbserver/ChangeLog entry: 2011-03-30 Pierre Muller * win32-low.c (windows-hdep.h): New include. (win32_create_inferior): Adapt to windows-hdep code. (win32_add_one_solib): Likewise. diff --git a/gdb/gdbserver/win32-low.c b/gdb/gdbserver/win32-low.c index b47081b..b471dcd 100644 --- a/gdb/gdbserver/win32-low.c +++ b/gdb/gdbserver/win32-low.c @@ -25,6 +25,7 @@ #include "gdb/fileio.h" #include "mem-break.h" #include "win32-low.h" +#include "windows-hdep.h" #include #include @@ -536,13 +537,17 @@ win32_create_inferior (char *program, char **program_args) path_ptr = getenv ("PATH"); if (path_ptr) { + int len = windows_conv_path_list (WINDOWS_POSIX_TO_NATIVE_A, + path_ptr, NULL, 0); orig_path = alloca (strlen (path_ptr) + 1); - new_path = alloca (cygwin_posix_to_win32_path_list_buf_size (path_ptr)); + new_path = alloca (len); strcpy (orig_path, path_ptr); - cygwin_posix_to_win32_path_list (path_ptr, new_path); + windows_conv_path_list (WINDOWS_POSIX_TO_NATIVE_A, path_ptr, + new_path, len); setenv ("PATH", new_path, 1); } - 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); } -- 1.7.4