blob: 1a9fc4e868cf67b7f850779c59f28f1ba64b0505 (
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
|
//===-- NativeThreadLinux.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_NativeThreadLinux_H_
#define liblldb_NativeThreadLinux_H_
#include "lldb/lldb-private-forward.h"
#include "../../../Host/common/NativeThreadProtocol.h"
namespace lldb_private
{
class NativeProcessLinux;
class NativeThreadLinux : public NativeThreadProtocol
{
friend class NativeProcessLinux;
public:
NativeThreadLinux (NativeProcessLinux *process, lldb::tid_t tid);
// ---------------------------------------------------------------------
// NativeThreadProtocol Interface
// ---------------------------------------------------------------------
const char *
GetName() override;
lldb::StateType
GetState () override;
bool
GetStopReason (ThreadStopInfo &stop_info) override;
NativeRegisterContextSP
GetRegisterContext () override;
Error
SetWatchpoint (lldb::addr_t addr, size_t size, uint32_t watch_flags, bool hardware) override;
Error
RemoveWatchpoint (lldb::addr_t addr) override;
uint32_t
TranslateStopInfoToGdbSignal (const ThreadStopInfo &stop_info) const override;
private:
// ---------------------------------------------------------------------
// Interface for friend classes
// ---------------------------------------------------------------------
void
SetLaunching ();
void
SetRunning ();
void
SetStepping ();
void
SetStoppedBySignal (uint32_t signo);
void
SetStoppedByBreakpoint ();
bool
IsStoppedAtBreakpoint ();
void
SetCrashedWithException (uint64_t exception_type, lldb::addr_t exception_addr);
void
SetSuspended ();
void
SetExited ();
// ---------------------------------------------------------------------
// Private interface
// ---------------------------------------------------------------------
void
MaybeLogStateChange (lldb::StateType new_state);
// ---------------------------------------------------------------------
// Member Variables
// ---------------------------------------------------------------------
lldb::StateType m_state;
ThreadStopInfo m_stop_info;
NativeRegisterContextSP m_reg_context_sp;
};
}
#endif // #ifndef liblldb_NativeThreadLinux_H_
|