summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Windows/Live/LocalDebugDelegate.cpp
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2016-11-23 16:26:37 +0000
committerAdrian McCarthy <amccarth@google.com>2016-11-23 16:26:37 +0000
commit4ad5def9b0dbd576d133d038181a56d19589ed12 (patch)
tree1f41c4d8cf38871c92cb5de55d473e48943cd393 /lldb/source/Plugins/Process/Windows/Live/LocalDebugDelegate.cpp
parent5abf14ba5194059184e3a312369d43fd8006d31e (diff)
downloadbcm5719-llvm-4ad5def9b0dbd576d133d038181a56d19589ed12.tar.gz
bcm5719-llvm-4ad5def9b0dbd576d133d038181a56d19589ed12.zip
Refactor LLDB's Windows process plugin (NFC)
The Windows process plugin was broken up into multiple pieces a while back in order to share code between debugging live processes and minidumps (postmortem) debugging. The minidump portion was replaced by a cross-platform solution. This left the plugin split into a formerly "common" base classes and the derived classes for live debugging. This extra layer made the code harder to understand and work with. This patch simplifies these class hierarchies by rolling the live debugging concrete classes up to the base classes. Last week I posted my intent to make this change to lldb-dev, and I didn't hear any objections. This involved moving code and changing references to classes like ProcessWindowsLive to ProcessWindows. It still builds for both 32- and 64-bit, and the tests still pass on 32-bit. (Tests on 64-bit weren't passing before this refactor for unrelated reasons.) llvm-svn: 287770
Diffstat (limited to 'lldb/source/Plugins/Process/Windows/Live/LocalDebugDelegate.cpp')
-rw-r--r--lldb/source/Plugins/Process/Windows/Live/LocalDebugDelegate.cpp73
1 files changed, 0 insertions, 73 deletions
diff --git a/lldb/source/Plugins/Process/Windows/Live/LocalDebugDelegate.cpp b/lldb/source/Plugins/Process/Windows/Live/LocalDebugDelegate.cpp
deleted file mode 100644
index af18999f431..00000000000
--- a/lldb/source/Plugins/Process/Windows/Live/LocalDebugDelegate.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-//===-- LocalDebugDelegate.cpp ----------------------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "LocalDebugDelegate.h"
-#include "ProcessWindowsLive.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-LocalDebugDelegate::LocalDebugDelegate(ProcessWP process)
- : m_process(process) {}
-
-void LocalDebugDelegate::OnExitProcess(uint32_t exit_code) {
- if (ProcessWindowsLiveSP process = GetProcessPointer())
- process->OnExitProcess(exit_code);
-}
-
-void LocalDebugDelegate::OnDebuggerConnected(lldb::addr_t image_base) {
- if (ProcessWindowsLiveSP process = GetProcessPointer())
- process->OnDebuggerConnected(image_base);
-}
-
-ExceptionResult
-LocalDebugDelegate::OnDebugException(bool first_chance,
- const ExceptionRecord &record) {
- if (ProcessWindowsLiveSP process = GetProcessPointer())
- return process->OnDebugException(first_chance, record);
- else
- return ExceptionResult::MaskException;
-}
-
-void LocalDebugDelegate::OnCreateThread(const HostThread &thread) {
- if (ProcessWindowsLiveSP process = GetProcessPointer())
- process->OnCreateThread(thread);
-}
-
-void LocalDebugDelegate::OnExitThread(lldb::tid_t thread_id,
- uint32_t exit_code) {
- if (ProcessWindowsLiveSP process = GetProcessPointer())
- process->OnExitThread(thread_id, exit_code);
-}
-
-void LocalDebugDelegate::OnLoadDll(const lldb_private::ModuleSpec &module_spec,
- lldb::addr_t module_addr) {
- if (ProcessWindowsLiveSP process = GetProcessPointer())
- process->OnLoadDll(module_spec, module_addr);
-}
-
-void LocalDebugDelegate::OnUnloadDll(lldb::addr_t module_addr) {
- if (ProcessWindowsLiveSP process = GetProcessPointer())
- process->OnUnloadDll(module_addr);
-}
-
-void LocalDebugDelegate::OnDebugString(const std::string &string) {
- if (ProcessWindowsLiveSP process = GetProcessPointer())
- process->OnDebugString(string);
-}
-
-void LocalDebugDelegate::OnDebuggerError(const Error &error, uint32_t type) {
- if (ProcessWindowsLiveSP process = GetProcessPointer())
- process->OnDebuggerError(error, type);
-}
-
-ProcessWindowsLiveSP LocalDebugDelegate::GetProcessPointer() {
- ProcessSP process = m_process.lock();
- return std::static_pointer_cast<ProcessWindowsLive>(process);
-}
OpenPOWER on IntegriCloud