blob: d1fb51b3f0800f02b0ee653794095995cd85d2eb [file] [log] [blame]
Zachary Turner742346a2014-11-05 22:16:28 +00001//===-- LocalDebugDelegate.cpp ----------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "LocalDebugDelegate.h"
11#include "ProcessWindows.h"
12
13using namespace lldb;
14using namespace lldb_private;
15
16LocalDebugDelegate::LocalDebugDelegate(ProcessSP process)
17 : m_process(process)
18{
19}
20
21void
Zachary Turnerd6a7b632014-11-12 19:31:39 +000022LocalDebugDelegate::OnExitProcess(uint32_t exit_code)
Zachary Turner742346a2014-11-05 22:16:28 +000023{
Zachary Turnerd6a7b632014-11-12 19:31:39 +000024 ((ProcessWindows &)*m_process).OnExitProcess(exit_code);
Zachary Turner742346a2014-11-05 22:16:28 +000025}
26
27void
Zachary Turnera32d2ce2014-11-12 19:31:56 +000028LocalDebugDelegate::OnDebuggerConnected(lldb::addr_t image_base)
Zachary Turner742346a2014-11-05 22:16:28 +000029{
Zachary Turnera32d2ce2014-11-12 19:31:56 +000030 ((ProcessWindows &)*m_process).OnDebuggerConnected(image_base);
Zachary Turner742346a2014-11-05 22:16:28 +000031}
32
Zachary Turnerdcd80372014-11-11 00:00:14 +000033ExceptionResult
Zachary Turnerd6a7b632014-11-12 19:31:39 +000034LocalDebugDelegate::OnDebugException(bool first_chance, const ExceptionRecord &record)
Zachary Turner742346a2014-11-05 22:16:28 +000035{
Zachary Turnerd6a7b632014-11-12 19:31:39 +000036 return ((ProcessWindows &)*m_process).OnDebugException(first_chance, record);
Zachary Turner742346a2014-11-05 22:16:28 +000037}
38
39void
Zachary Turnerd6a7b632014-11-12 19:31:39 +000040LocalDebugDelegate::OnCreateThread(const HostThread &thread)
Zachary Turner742346a2014-11-05 22:16:28 +000041{
Zachary Turnerd6a7b632014-11-12 19:31:39 +000042 ((ProcessWindows &)*m_process).OnCreateThread(thread);
Zachary Turner742346a2014-11-05 22:16:28 +000043}
44
45void
Adrian McCarthy2f8e4c32015-05-18 23:24:32 +000046LocalDebugDelegate::OnExitThread(lldb::tid_t thread_id, uint32_t exit_code)
Zachary Turner742346a2014-11-05 22:16:28 +000047{
Adrian McCarthy2f8e4c32015-05-18 23:24:32 +000048 ((ProcessWindows &)*m_process).OnExitThread(thread_id, exit_code);
Zachary Turner742346a2014-11-05 22:16:28 +000049}
50
51void
Zachary Turnera32d2ce2014-11-12 19:31:56 +000052LocalDebugDelegate::OnLoadDll(const lldb_private::ModuleSpec &module_spec, lldb::addr_t module_addr)
Zachary Turner742346a2014-11-05 22:16:28 +000053{
Zachary Turnera32d2ce2014-11-12 19:31:56 +000054 ((ProcessWindows &)*m_process).OnLoadDll(module_spec, module_addr);
Zachary Turner742346a2014-11-05 22:16:28 +000055}
56
57void
Zachary Turnera32d2ce2014-11-12 19:31:56 +000058LocalDebugDelegate::OnUnloadDll(lldb::addr_t module_addr)
Zachary Turner742346a2014-11-05 22:16:28 +000059{
Zachary Turnera32d2ce2014-11-12 19:31:56 +000060 ((ProcessWindows &)*m_process).OnUnloadDll(module_addr);
Zachary Turner742346a2014-11-05 22:16:28 +000061}
62
63void
Zachary Turnerd6a7b632014-11-12 19:31:39 +000064LocalDebugDelegate::OnDebugString(const std::string &string)
Zachary Turner742346a2014-11-05 22:16:28 +000065{
Zachary Turnerd6a7b632014-11-12 19:31:39 +000066 ((ProcessWindows &)*m_process).OnDebugString(string);
Zachary Turner742346a2014-11-05 22:16:28 +000067}
68
69void
Zachary Turnerd6a7b632014-11-12 19:31:39 +000070LocalDebugDelegate::OnDebuggerError(const Error &error, uint32_t type)
Zachary Turner742346a2014-11-05 22:16:28 +000071{
Zachary Turnerd6a7b632014-11-12 19:31:39 +000072 ((ProcessWindows &)*m_process).OnDebuggerError(error, type);
Zachary Turner742346a2014-11-05 22:16:28 +000073}