diff options
author | Virgile Bello <virgile.bello@gmail.com> | 2013-08-23 12:44:05 +0000 |
---|---|---|
committer | Virgile Bello <virgile.bello@gmail.com> | 2013-08-23 12:44:05 +0000 |
commit | b2f1fb2943c5e6833dcd2e1166b83ae4aca06d7a (patch) | |
tree | 2cf9567a828318ccccd4df22f7af31b4e796e5ec /lldb/source/Plugins/Process/gdb-remote | |
parent | fcfa0afd7a09133d00bdc047cf894fce005a287a (diff) | |
download | bcm5719-llvm-b2f1fb2943c5e6833dcd2e1166b83ae4aca06d7a.tar.gz bcm5719-llvm-b2f1fb2943c5e6833dcd2e1166b83ae4aca06d7a.zip |
MingW compilation (windows). Includes various refactoring to improve portability.
llvm-svn: 189107
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote')
4 files changed, 17 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index ca594a8f3fd..6a6e063e35b 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -29,10 +29,15 @@ #include "Utility/StringExtractorGDBRemote.h" #include "ProcessGDBRemote.h" #include "ProcessGDBRemoteLog.h" +#include "lldb/Host/Config.h" using namespace lldb; using namespace lldb_private; +#ifdef LLDB_DISABLE_POSIX +#define SIGSTOP 17 +#endif + //---------------------------------------------------------------------- // GDBRemoteCommunicationClient constructor //---------------------------------------------------------------------- diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp index 3a14e9fe759..050ed00ff6d 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp @@ -668,6 +668,10 @@ GDBRemoteCommunicationServer::Handle_qC (StringExtractorGDBRemote &packet) bool GDBRemoteCommunicationServer::Handle_qLaunchGDBServer (StringExtractorGDBRemote &packet) { +#ifdef _WIN32 + // No unix sockets on windows + return false; +#else // Spawn a local debugserver as a platform so we can then attach or launch // a process... @@ -731,6 +735,7 @@ GDBRemoteCommunicationServer::Handle_qLaunchGDBServer (StringExtractorGDBRemote } } return SendErrorResponse (13); +#endif } bool diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index d27207f121d..4a3bd041524 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -8,13 +8,16 @@ //===----------------------------------------------------------------------===// #include "lldb/lldb-python.h" +#include "lldb/Host/Config.h" // C Includes #include <errno.h> -#include <spawn.h> #include <stdlib.h> +#ifndef LLDB_DISABLE_POSIX +#include <spawn.h> #include <netinet/in.h> #include <sys/mman.h> // for mmap +#endif #include <sys/stat.h> #include <sys/types.h> #include <time.h> @@ -2687,7 +2690,7 @@ ProcessGDBRemote::KillDebugserverProcess () { if (m_debugserver_pid != LLDB_INVALID_PROCESS_ID) { - ::kill (m_debugserver_pid, SIGINT); + Host::Kill (m_debugserver_pid, SIGINT); m_debugserver_pid = LLDB_INVALID_PROCESS_ID; } } @@ -2794,7 +2797,7 @@ ProcessGDBRemote::StopAsyncThread () } -void * +thread_result_t ProcessGDBRemote::AsyncThread (void *arg) { ProcessGDBRemote *process = (ProcessGDBRemote*) arg; diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h index e104b7191ea..c8bd42bdfab 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h @@ -340,7 +340,7 @@ protected: void StopAsyncThread (); - static void * + static lldb::thread_result_t AsyncThread (void *arg); static bool |