Files
clang-p2996/lldb/source/Plugins/Process/Windows/Live/LocalDebugDelegate.cpp
Kate Stone b9c1b51e45 *** This commit represents a complete reformatting of the LLDB source code
*** to conform to clang-format’s LLVM style.  This kind of mass change has
*** two obvious implications:

Firstly, merging this particular commit into a downstream fork may be a huge
effort.  Alternatively, it may be worth merging all changes up to this commit,
performing the same reformatting operation locally, and then discarding the
merge for this particular commit.  The commands used to accomplish this
reformatting were as follows (with current working directory as the root of
the repository):

    find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} +
    find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ;

The version of clang-format used was 3.9.0, and autopep8 was 1.2.4.

Secondly, “blame” style tools will generally point to this commit instead of
a meaningful prior commit.  There are alternatives available that will attempt
to look through this change and find the appropriate prior commit.  YMMV.

llvm-svn: 280751
2016-09-06 20:57:50 +00:00

74 lines
2.5 KiB
C++

//===-- 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);
}