diff options
-rw-r--r-- | lldb/include/lldb/Host/File.h | 1 | ||||
-rw-r--r-- | lldb/include/lldb/Host/windows/win32.h | 16 | ||||
-rw-r--r-- | lldb/source/Host/common/File.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/windows/Windows.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp | 14 |
5 files changed, 30 insertions, 5 deletions
diff --git a/lldb/include/lldb/Host/File.h b/lldb/include/lldb/Host/File.h index bb04784a2fe..9378f60682f 100644 --- a/lldb/include/lldb/Host/File.h +++ b/lldb/include/lldb/Host/File.h @@ -12,6 +12,7 @@ #if defined(__cplusplus) #include <stdio.h> +#include <sys/types.h> #include "lldb/lldb-private.h" diff --git a/lldb/include/lldb/Host/windows/win32.h b/lldb/include/lldb/Host/windows/win32.h index 3daa6bc0a13..918c00098b0 100644 --- a/lldb/include/lldb/Host/windows/win32.h +++ b/lldb/include/lldb/Host/windows/win32.h @@ -20,8 +20,24 @@ char* realpath(const char * name, char * resolved); #define PATH_MAX MAX_PATH #define O_NOCTTY 0 +#define O_NONBLOCK 0 #define SIGTRAP 5 #define SIGKILL 9 #define SIGSTOP 20 +#if defined(_MSC_VER) +# define S_IRUSR S_IREAD /* read, user */ +# define S_IWUSR S_IWRITE /* write, user */ +# define S_IXUSR 0 /* execute, user */ +#endif +#define S_IRGRP 0 /* read, group */ +#define S_IWGRP 0 /* write, group */ +#define S_IXGRP 0 /* execute, group */ +#define S_IROTH 0 /* read, others */ +#define S_IWOTH 0 /* write, others */ +#define S_IXOTH 0 /* execute, others */ +#define S_IRWXU 0 +#define S_IRWXG 0 +#define S_IRWXO 0 + #endif // LLDB_lldb_win32_h_ diff --git a/lldb/source/Host/common/File.cpp b/lldb/source/Host/common/File.cpp index ec33bca4905..5922623a21f 100644 --- a/lldb/source/Host/common/File.cpp +++ b/lldb/source/Host/common/File.cpp @@ -252,14 +252,12 @@ File::Open (const char *path, uint32_t options, uint32_t permissions) if (permissions & ePermissionsUserRead) mode |= S_IRUSR; if (permissions & ePermissionsUserWrite) mode |= S_IWUSR; if (permissions & ePermissionsUserExecute) mode |= S_IXUSR; -#ifndef _WIN32 if (permissions & ePermissionsGroupRead) mode |= S_IRGRP; if (permissions & ePermissionsGroupWrite) mode |= S_IWGRP; if (permissions & ePermissionsGroupExecute) mode |= S_IXGRP; if (permissions & ePermissionsWorldRead) mode |= S_IROTH; if (permissions & ePermissionsWorldWrite) mode |= S_IWOTH; if (permissions & ePermissionsWorldExecute) mode |= S_IXOTH; -#endif } do diff --git a/lldb/source/Host/windows/Windows.cpp b/lldb/source/Host/windows/Windows.cpp index 34dbc238428..ed886c72123 100644 --- a/lldb/source/Host/windows/Windows.cpp +++ b/lldb/source/Host/windows/Windows.cpp @@ -65,7 +65,7 @@ char * strcasestr(const char *s, const char* find) return ((char *) s); } -char* __cdecl realpath(const char * name, char * resolved) +char* realpath(const char * name, char * resolved) { char *retname = NULL; /* we will return this, if we fail */ diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp index f6fdf1513eb..f81446c4482 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp @@ -885,7 +885,7 @@ GDBRemoteCommunicationServer::Handle_qKillSpawnedProcess (StringExtractorGDBRemo if (m_spawned_pids.find(pid) == m_spawned_pids.end()) return SendErrorResponse (10); } - kill (pid, SIGTERM); + Host::Kill (pid, SIGTERM); for (size_t i=0; i<10; ++i) { @@ -904,7 +904,7 @@ GDBRemoteCommunicationServer::Handle_qKillSpawnedProcess (StringExtractorGDBRemo if (m_spawned_pids.find(pid) == m_spawned_pids.end()) return true; } - kill (pid, SIGKILL); + Host::Kill (pid, SIGKILL); for (size_t i=0; i<10; ++i) { @@ -1111,6 +1111,10 @@ GDBRemoteCommunicationServer::Handle_vFile_Close (StringExtractorGDBRemote &pack bool GDBRemoteCommunicationServer::Handle_vFile_pRead (StringExtractorGDBRemote &packet) { +#ifdef _WIN32 + // Not implemented on Windows + return false; +#else StreamGDBRemote response; packet.SetFilePos(::strlen("vFile:pread:")); int fd = packet.GetS32(-1); @@ -1140,11 +1144,16 @@ GDBRemoteCommunicationServer::Handle_vFile_pRead (StringExtractorGDBRemote &pack } SendPacketNoLock(response.GetData(), response.GetSize()); return true; +#endif } bool GDBRemoteCommunicationServer::Handle_vFile_pWrite (StringExtractorGDBRemote &packet) { +#ifdef _WIN32 + // Not implemented on Windows + return false; +#else packet.SetFilePos(::strlen("vFile:pwrite:")); StreamGDBRemote response; @@ -1172,6 +1181,7 @@ GDBRemoteCommunicationServer::Handle_vFile_pWrite (StringExtractorGDBRemote &pac SendPacketNoLock(response.GetData(), response.GetSize()); return true; +#endif } bool |