1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
//===-- ProcessWindows.h ----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_Plugins_Process_Windows_ProcessWindows_H_
#define liblldb_Plugins_Process_Windows_ProcessWindows_H_
// C Includes
// C++ Includes
#include <map>
#include <memory>
#include <queue>
// Other libraries and framework includes
#include "ForwardDecl.h"
#include "IDebugDelegate.h"
#include "lldb/lldb-forward.h"
#include "lldb/Core/Error.h"
#include "lldb/Host/HostThread.h"
#include "lldb/Target/Process.h"
class ProcessMonitor;
namespace lldb_private
{
class ProcessWindowsData;
}
class ProcessWindows : public lldb_private::Process, public lldb_private::IDebugDelegate
{
public:
//------------------------------------------------------------------
// Static functions.
//------------------------------------------------------------------
static lldb::ProcessSP
CreateInstance(lldb_private::Target& target,
lldb_private::Listener &listener,
const lldb_private::FileSpec *);
static void
Initialize();
static void
Terminate();
static lldb_private::ConstString
GetPluginNameStatic();
static const char *
GetPluginDescriptionStatic();
//------------------------------------------------------------------
// Constructors and destructors
//------------------------------------------------------------------
ProcessWindows(lldb_private::Target& target,
lldb_private::Listener &listener);
~ProcessWindows();
virtual lldb_private::Error
DoDetach(bool keep_stopped);
virtual bool
DetachRequiresHalt() { return true; }
virtual bool
UpdateThreadList(lldb_private::ThreadList &old_thread_list, lldb_private::ThreadList &new_thread_list);
virtual lldb_private::Error
DoLaunch (lldb_private::Module *exe_module,
lldb_private::ProcessLaunchInfo &launch_info);
virtual lldb_private::Error
DoResume ();
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
virtual lldb_private::ConstString
GetPluginName();
virtual uint32_t
GetPluginVersion();
virtual void
GetPluginCommandHelp(const char *command, lldb_private::Stream *strm);
virtual lldb_private::Error
ExecutePluginCommand(lldb_private::Args &command,
lldb_private::Stream *strm);
virtual lldb_private::Log *
EnablePluginLogging(lldb_private::Stream *strm,
lldb_private::Args &command);
virtual bool
CanDebug(lldb_private::Target &target, bool plugin_specified_by_name);
virtual lldb_private::Error
DoDestroy ();
virtual void
RefreshStateAfterStop ();
virtual bool
IsAlive ();
virtual size_t DoReadMemory(lldb::addr_t vm_addr, void *buf, size_t size, lldb_private::Error &error);
// IDebugDelegate overrides.
virtual void OnExitProcess(uint32_t exit_code) override;
virtual void OnDebuggerConnected(lldb::addr_t image_base) override;
virtual ExceptionResult OnDebugException(bool first_chance, const lldb_private::ExceptionRecord &record) override;
virtual void OnCreateThread(const lldb_private::HostThread &thread) override;
virtual void OnExitThread(const lldb_private::HostThread &thread) override;
virtual void OnLoadDll(const lldb_private::ModuleSpec &module_spec, lldb::addr_t module_addr) override;
virtual void OnUnloadDll(lldb::addr_t module_addr) override;
virtual void OnDebugString(const std::string &string) override;
virtual void OnDebuggerError(const lldb_private::Error &error, uint32_t type) override;
private:
// Data for the active debugging session.
std::unique_ptr<lldb_private::ProcessWindowsData> m_session_data;
};
#endif // liblldb_Plugins_Process_Windows_ProcessWindows_H_
|