From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: <gdb-patches@sourceware.org>
Subject: [RFC 6/9] Unify windows specifics into common/windows-hdep files
Date: Wed, 30 Mar 2011 12:15:00 -0000 [thread overview]
Message-ID: <00b101cbeed2$b5aa4990$20fedcb0$@muller@ics-cnrs.unistra.fr> (raw)
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 <muller@ics.u-strasbg.fr>
* 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 <windows.h>
#include <winnt.h>
@@ -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
next reply other threads:[~2011-03-30 12:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-30 12:15 Pierre Muller [this message]
[not found] <00b101cbeed2$b5aa4990$20fedcb0$%muller@ics-cnrs.unistra.fr>
2011-03-30 21:00 ` Eli Zaretskii
2011-03-31 13:58 ` Pierre Muller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00b101cbeed2$b5aa4990$20fedcb0$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox