aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-nat.c
diff options
context:
space:
mode:
authorChristopher Faylor <me+cygwin@cgf.cx>2010-03-09 19:10:39 +0000
committerChristopher Faylor <me+cygwin@cgf.cx>2010-03-09 19:10:39 +0000
commit60c5c0213ab9c33902c8f483c4bf0447736415a4 (patch)
tree0601a2eac97a619c876a8c5dceaa6763221008fb /gdb/windows-nat.c
parent60a1502afcd909c408239a4397b231b26c1d52c4 (diff)
downloadgdb-60c5c0213ab9c33902c8f483c4bf0447736415a4.zip
gdb-60c5c0213ab9c33902c8f483c4bf0447736415a4.tar.gz
gdb-60c5c0213ab9c33902c8f483c4bf0447736415a4.tar.bz2
* windows-nat.c (cygwin_conv_path): Redefine to properly convert from/to
posix/win32. (windows_make_so): Use non-Cygwin 1.7 specific function. (windows_create_inferior): Make sure that cygallargs points to original args in non Cygwin 1.7. case.
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r--gdb/windows-nat.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 87f9c43..01d5f03 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -115,6 +115,12 @@ static struct target_ops windows_ops;
# define GetModuleFileNameEx_name "GetModuleFileNameExW"
# define bad_GetModuleFileNameEx bad_GetModuleFileNameExW
# else
+# define CCP_POSIX_TO_WIN_W 1
+# define CCP_WIN_W_TO_POSIX 3
+# define cygwin_conv_path(op, from, to, size) \
+ (op == CCP_WIN_W_TO_POSIX) ? \
+ cygwin_conv_to_full_posix_path (from, to) : \
+ cygwin_conv_to_win32_path (from, to)
# define cygwin_conv_path(op, from, to, size) cygwin_conv_to_full_posix_path (from, to)
typedef char cygwin_buf_t;
static DWORD WINAPI (*GetModuleFileNameEx) (HANDLE, HMODULE, LPSTR, DWORD);
@@ -122,6 +128,7 @@ static struct target_ops windows_ops;
# define CreateProcess CreateProcessA
# define GetModuleFileNameEx_name "GetModuleFileNameExA"
# define bad_GetModuleFileNameEx bad_GetModuleFileNameExA
+# define CW_SET_DOS_FILE_WARNING -1 /* no-op this for older Cygwin */
# endif
#endif
@@ -706,7 +713,7 @@ windows_make_so (const char *name, LPVOID load_addr)
SO_NAME_MAX_PATH_SIZE);
else
{
- char *rname = canonicalize_file_name (name);
+ char *rname = realpath (name, NULL);
if (rname && strlen (rname) < SO_NAME_MAX_PATH_SIZE)
{
strcpy (so->so_name, rname);
@@ -1945,6 +1952,8 @@ windows_create_inferior (struct target_ops *ops, char *exec_file,
error (_("Error starting executable: %d"), errno);
cygallargs = (wchar_t *) alloca (len * sizeof (wchar_t));
mbstowcs (cygallargs, allargs, len);
+#else
+ cygallargs = allargs;
#endif
}
else