blob: 0abc023babdbdbe87ffd608fb6acdb641785043b (
plain)
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
|
//===-- ProcessLinux.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_ProcessLinux_H_
#define liblldb_ProcessLinux_H_
// C Includes
// C++ Includes
#include <queue>
// Other libraries and framework includes
#include "lldb/Target/Process.h"
#include "Plugins/Process/POSIX/ProcessMessage.h"
#include "Plugins/Process/POSIX/ProcessPOSIX.h"
class ProcessMonitor;
namespace lldb_private {
namespace process_linux {
class ProcessLinux : public ProcessPOSIX
{
public:
//------------------------------------------------------------------
// Static functions.
//------------------------------------------------------------------
static lldb::ProcessSP
CreateInstance(Target& target,
Listener &listener,
const FileSpec *);
static void
Initialize();
static void
Terminate();
static ConstString
GetPluginNameStatic();
static const char *
GetPluginDescriptionStatic();
//------------------------------------------------------------------
// Constructors and destructors
//------------------------------------------------------------------
ProcessLinux(Target& target,
Listener &listener,
const FileSpec *core_file);
Error
DoDetach(bool keep_stopped) override;
bool
DetachRequiresHalt() override { return true; }
bool
UpdateThreadList(ThreadList &old_thread_list, ThreadList &new_thread_list) override;
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
ConstString
GetPluginName() override;
uint32_t
GetPluginVersion() override;
virtual void
GetPluginCommandHelp(const char *command, Stream *strm);
virtual Error
ExecutePluginCommand(Args &command,
Stream *strm);
virtual Log *
EnablePluginLogging(Stream *strm,
Args &command);
bool
CanDebug(Target &target, bool plugin_specified_by_name) override;
//------------------------------------------------------------------
// ProcessPOSIX overrides
//------------------------------------------------------------------
void
StopAllThreads(lldb::tid_t stop_tid) override;
POSIXThread *
CreateNewPOSIXThread(Process &process, lldb::tid_t tid) override;
private:
const FileSpec *m_core_file;
// Flag to avoid recursion when stopping all threads.
bool m_stopping_threads;
};
} // namespace process_linux
} // namespace lldb_private
#endif // liblldb_ProcessLinux_H_
|