blob: 59f5cd92f5e28441ca1d91e810e492e6dacb21fe [file] [log] [blame]
Dimitry Andric9a3a6ab2016-01-11 18:07:47 +00001//===-- IDebugDelegate.h ----------------------------------------*- C++ -*-===//
2//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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
Dimitry Andric9a3a6ab2016-01-11 18:07:47 +00006//
7//===----------------------------------------------------------------------===//
8
9#ifndef liblldb_Plugins_Process_Windows_IDebugDelegate_H_
10#define liblldb_Plugins_Process_Windows_IDebugDelegate_H_
11
12#include "ForwardDecl.h"
13#include "lldb/lldb-forward.h"
14#include "lldb/lldb-types.h"
15#include <string>
16
Kate Stoneb9c1b512016-09-06 20:57:50 +000017namespace lldb_private {
Zachary Turner97206d52017-05-12 04:51:55 +000018class Status;
Dimitry Andric9a3a6ab2016-01-11 18:07:47 +000019class HostThread;
20
21//----------------------------------------------------------------------
22// IDebugDelegate
23//
24// IDebugDelegate defines an interface which allows implementors to receive
25// notification of events that happen in a debugged process.
26//----------------------------------------------------------------------
Kate Stoneb9c1b512016-09-06 20:57:50 +000027class IDebugDelegate {
28public:
29 virtual ~IDebugDelegate() {}
Dimitry Andric9a3a6ab2016-01-11 18:07:47 +000030
Kate Stoneb9c1b512016-09-06 20:57:50 +000031 virtual void OnExitProcess(uint32_t exit_code) = 0;
32 virtual void OnDebuggerConnected(lldb::addr_t image_base) = 0;
33 virtual ExceptionResult OnDebugException(bool first_chance,
34 const ExceptionRecord &record) = 0;
35 virtual void OnCreateThread(const HostThread &thread) = 0;
36 virtual void OnExitThread(lldb::tid_t thread_id, uint32_t exit_code) = 0;
37 virtual void OnLoadDll(const ModuleSpec &module_spec,
38 lldb::addr_t module_addr) = 0;
39 virtual void OnUnloadDll(lldb::addr_t module_addr) = 0;
40 virtual void OnDebugString(const std::string &string) = 0;
Zachary Turner97206d52017-05-12 04:51:55 +000041 virtual void OnDebuggerError(const Status &error, uint32_t type) = 0;
Dimitry Andric9a3a6ab2016-01-11 18:07:47 +000042};
43}
44
45#endif