LLDB mainline
LocalDebugDelegate.cpp
Go to the documentation of this file.
1//===-- LocalDebugDelegate.cpp --------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
10#include "ProcessWindows.h"
11
12using namespace lldb;
13using namespace lldb_private;
14
17
18void LocalDebugDelegate::OnExitProcess(uint32_t exit_code) {
19 if (ProcessWindowsSP process = GetProcessPointer())
20 process->OnExitProcess(exit_code);
21}
22
24 if (ProcessWindowsSP process = GetProcessPointer())
25 process->OnDebuggerConnected(image_base);
26}
27
30 const ExceptionRecord &record) {
31 if (ProcessWindowsSP process = GetProcessPointer())
32 return process->OnDebugException(first_chance, record);
33 else
35}
36
38 if (ProcessWindowsSP process = GetProcessPointer())
39 process->OnCreateThread(thread);
40}
41
43 uint32_t exit_code) {
44 if (ProcessWindowsSP process = GetProcessPointer())
45 process->OnExitThread(thread_id, exit_code);
46}
47
50 lldb::addr_t module_addr, lldb::tid_t thread_id) {
51 if (ProcessWindowsSP process = GetProcessPointer())
52 return process->OnLoadDll(module_spec, module_addr, thread_id);
54}
55
57 lldb::tid_t thread_id) {
58 if (ProcessWindowsSP process = GetProcessPointer())
59 return process->OnUnloadDll(module_addr, thread_id);
61}
62
64 bool is_unicode,
65 uint16_t length_lower_word) {
66 if (ProcessWindowsSP process = GetProcessPointer())
67 process->OnDebugString(debug_string_addr, is_unicode, length_lower_word);
68}
69
71 if (ProcessWindowsSP process = GetProcessPointer())
72 process->OnDebuggerError(error, type);
73}
74
76 ProcessSP process = m_process.lock();
77 return std::static_pointer_cast<ProcessWindows>(process);
78}
static llvm::raw_ostream & error(Stream &strm)
DllEventAction
Definition ForwardDecl.h:29
void OnExitProcess(uint32_t exit_code) override
DllEventAction OnUnloadDll(lldb::addr_t module_addr, lldb::tid_t thread_id) override
void OnDebuggerError(const Status &error, uint32_t type) override
ExceptionResult OnDebugException(bool first_chance, const ExceptionRecord &record) override
DllEventAction OnLoadDll(const lldb_private::ModuleSpec &module_spec, lldb::addr_t module_addr, lldb::tid_t thread_id) override
void OnDebugString(lldb::addr_t debug_string_addr, bool is_unicode, uint16_t length_lower_word) override
void OnExitThread(lldb::tid_t thread_id, uint32_t exit_code) override
LocalDebugDelegate(lldb::ProcessWP process)
void OnDebuggerConnected(lldb::addr_t image_base) override
void OnCreateThread(const HostThread &thread) override
An error handling class.
Definition Status.h:118
A class that represents a running process on the host machine.
std::shared_ptr< ProcessWindows > ProcessWindowsSP
std::shared_ptr< lldb_private::Process > ProcessSP
std::weak_ptr< lldb_private::Process > ProcessWP
uint64_t addr_t
Definition lldb-types.h:80
uint64_t tid_t
Definition lldb-types.h:84