1 //===-- IDebugDelegate.h ----------------------------------------*- 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 #ifndef liblldb_Plugins_Process_Windows_IDebugDelegate_H_
11 #define liblldb_Plugins_Process_Windows_IDebugDelegate_H_
12 
13 #include "ForwardDecl.h"
14 #include "lldb/lldb-forward.h"
15 #include "lldb/lldb-types.h"
16 #include <string>
17 
18 namespace lldb_private {
19 class Error;
20 class HostThread;
21 
22 //----------------------------------------------------------------------
23 // IDebugDelegate
24 //
25 // IDebugDelegate defines an interface which allows implementors to receive
26 // notification of events that happen in a debugged process.
27 //----------------------------------------------------------------------
28 class IDebugDelegate {
29 public:
30   virtual ~IDebugDelegate() {}
31 
32   virtual void OnExitProcess(uint32_t exit_code) = 0;
33   virtual void OnDebuggerConnected(lldb::addr_t image_base) = 0;
34   virtual ExceptionResult OnDebugException(bool first_chance,
35                                            const ExceptionRecord &record) = 0;
36   virtual void OnCreateThread(const HostThread &thread) = 0;
37   virtual void OnExitThread(lldb::tid_t thread_id, uint32_t exit_code) = 0;
38   virtual void OnLoadDll(const ModuleSpec &module_spec,
39                          lldb::addr_t module_addr) = 0;
40   virtual void OnUnloadDll(lldb::addr_t module_addr) = 0;
41   virtual void OnDebugString(const std::string &string) = 0;
42   virtual void OnDebuggerError(const Error &error, uint32_t type) = 0;
43 };
44 }
45 
46 #endif
47