summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-11-05 22:16:28 +0000
committerZachary Turner <zturner@google.com>2014-11-05 22:16:28 +0000
commit742346a22f591938ea8d0f10a9ae6135649d0057 (patch)
tree981d81eca5886f59a75c88f9008db9c3956b7561 /lldb/source/Plugins/Process/Windows/ProcessWindows.cpp
parent1839abdabe24a8a5211e21c71769253d5cf69d1d (diff)
downloadbcm5719-llvm-742346a22f591938ea8d0f10a9ae6135649d0057.tar.gz
bcm5719-llvm-742346a22f591938ea8d0f10a9ae6135649d0057.zip
Decouple ProcessWindows from the Windows debug driver thread.
In the llgs world, ProcessWindows will eventually go away and we'll implement a different protocol. This patch decouples ProcessWindows from the core debug loop so that this transition will not be more difficult than it needs to be. llvm-svn: 221405
Diffstat (limited to 'lldb/source/Plugins/Process/Windows/ProcessWindows.cpp')
-rw-r--r--lldb/source/Plugins/Process/Windows/ProcessWindows.cpp57
1 files changed, 55 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp
index e71c25f83a5..be302bdc7cf 100644
--- a/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/ProcessWindows.cpp
@@ -29,6 +29,8 @@
#include "DebugDriverThread.h"
#include "DebugProcessLauncher.h"
+#include "LocalDebugDelegate.h"
+#include "ProcessMessages.h"
#include "ProcessWindows.h"
using namespace lldb;
@@ -109,7 +111,8 @@ ProcessWindows::DoLaunch(Module *exe_module,
// If we're trying to debug this process, we need to use a
// DebugProcessLauncher so that we can enter a WaitForDebugEvent loop
// on the same thread that does the CreateProcess.
- DebugProcessLauncher launcher(shared_from_this());
+ DebugDelegateSP delegate(new LocalDebugDelegate(shared_from_this()));
+ DebugProcessLauncher launcher(delegate);
process = launcher.LaunchProcess(launch_info, result);
}
else
@@ -199,7 +202,6 @@ ProcessWindows::DoReadMemory(lldb::addr_t vm_addr,
return 0;
}
-
bool
ProcessWindows::CanDebug(Target &target, bool plugin_specified_by_name)
{
@@ -212,3 +214,54 @@ ProcessWindows::CanDebug(Target &target, bool plugin_specified_by_name)
return exe_module_sp->GetFileSpec().Exists();
return false;
}
+
+void
+ProcessWindows::OnProcessLaunched(const ProcessMessageCreateProcess &message)
+{
+}
+
+void
+ProcessWindows::OnExitProcess(const ProcessMessageExitProcess &message)
+{
+ SetProcessExitStatus(nullptr, GetID(), true, 0, message.GetExitCode());
+}
+
+void
+ProcessWindows::OnDebuggerConnected(const ProcessMessageDebuggerConnected &message)
+{
+}
+
+void
+ProcessWindows::OnDebugException(const ProcessMessageException &message)
+{
+}
+
+void
+ProcessWindows::OnCreateThread(const ProcessMessageCreateThread &message)
+{
+}
+
+void
+ProcessWindows::OnExitThread(const ProcessMessageExitThread &message)
+{
+}
+
+void
+ProcessWindows::OnLoadDll(const ProcessMessageLoadDll &message)
+{
+}
+
+void
+ProcessWindows::OnUnloadDll(const ProcessMessageUnloadDll &message)
+{
+}
+
+void
+ProcessWindows::OnDebugString(const ProcessMessageDebugString &message)
+{
+}
+
+void
+ProcessWindows::OnDebuggerError(const ProcessMessageDebuggerError &message)
+{
+}
OpenPOWER on IntegriCloud