[ProcessWindows] Simplify the DebugDelegate interface.
Due to a previous multi-threaded design involving message
passing, we used message classes to pass event information
to the delegate. Since the multi-threaded design has gone
away, we simplify this by passing event arguments as direct
function parameters, which is more clear and easier to
understand.
llvm-svn: 221806
diff --git a/lldb/source/Plugins/Process/Windows/DebuggerThread.cpp b/lldb/source/Plugins/Process/Windows/DebuggerThread.cpp
index 00e0849..f67438c 100644
--- a/lldb/source/Plugins/Process/Windows/DebuggerThread.cpp
+++ b/lldb/source/Plugins/Process/Windows/DebuggerThread.cpp
@@ -10,7 +10,6 @@
#include "DebuggerThread.h"
#include "ExceptionRecord.h"
#include "IDebugDelegate.h"
-#include "ProcessMessages.h"
#include "lldb/Core/Error.h"
#include "lldb/Core/Log.h"
@@ -90,10 +89,7 @@
if (error.Success())
DebugLoop();
else
- {
- ProcessMessageDebuggerError message(m_process, error, 0);
- m_debug_delegate->OnDebuggerError(message);
- }
+ m_debug_delegate->OnDebuggerError(error, 0);
return 0;
}
@@ -163,8 +159,7 @@
DebuggerThread::HandleExceptionEvent(const EXCEPTION_DEBUG_INFO &info, DWORD thread_id)
{
bool first_chance = (info.dwFirstChance != 0);
- ProcessMessageException message(m_process, ExceptionRecord(info.ExceptionRecord), first_chance);
- return m_debug_delegate->OnDebugException(message);
+ return m_debug_delegate->OnDebugException(first_chance, ExceptionRecord(info.ExceptionRecord));
}
DWORD
@@ -190,8 +185,7 @@
((HostThreadWindows &)m_main_thread.GetNativeThread()).SetOwnsHandle(false);
m_image_file = info.hFile;
- ProcessMessageDebuggerConnected message(m_process);
- m_debug_delegate->OnDebuggerConnected(message);
+ m_debug_delegate->OnDebuggerConnected();
return DBG_CONTINUE;
}
@@ -205,8 +199,7 @@
DWORD
DebuggerThread::HandleExitProcessEvent(const EXIT_PROCESS_DEBUG_INFO &info, DWORD thread_id)
{
- ProcessMessageExitProcess message(m_process, info.dwExitCode);
- m_debug_delegate->OnExitProcess(message);
+ m_debug_delegate->OnExitProcess(info.dwExitCode);
m_process = HostProcess();
m_main_thread = HostThread();
@@ -239,8 +232,7 @@
DebuggerThread::HandleRipEvent(const RIP_INFO &info, DWORD thread_id)
{
Error error(info.dwError, eErrorTypeWin32);
- ProcessMessageDebuggerError message(m_process, error, info.dwType);
- m_debug_delegate->OnDebuggerError(message);
+ m_debug_delegate->OnDebuggerError(error, info.dwType);
return DBG_CONTINUE;
}