]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/POSIXStopInfo.h
Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.7.0
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / source / Plugins / Process / FreeBSD / POSIXStopInfo.h
1 //===-- POSIXStopInfo.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_POSIXStopInfo_H_
11 #define liblldb_POSIXStopInfo_H_
12
13 // C Includes
14 // C++ Includes
15 // Other libraries and framework includes
16 // Project includes
17 #include "lldb/Target/StopInfo.h"
18
19 #include "CrashReason.h"
20 #include "POSIXThread.h"
21
22 #include <string>
23
24 //===----------------------------------------------------------------------===//
25 /// @class POSIXStopInfo
26 /// @brief Simple base class for all POSIX-specific StopInfo objects.
27 ///
28 class POSIXStopInfo
29     : public lldb_private::StopInfo
30 {
31 public:
32     POSIXStopInfo(lldb_private::Thread &thread, uint32_t status)
33         : StopInfo(thread, status)
34         { }
35 };
36
37 //===----------------------------------------------------------------------===//
38 /// @class POSIXLimboStopInfo
39 /// @brief Represents the stop state of a process ready to exit.
40 ///
41 class POSIXLimboStopInfo
42     : public POSIXStopInfo
43 {
44 public:
45     POSIXLimboStopInfo(POSIXThread &thread)
46         : POSIXStopInfo(thread, 0)
47         { }
48
49     ~POSIXLimboStopInfo();
50
51     lldb::StopReason
52     GetStopReason() const;
53
54     const char *
55     GetDescription();
56
57     bool
58     ShouldStop(lldb_private::Event *event_ptr);
59
60     bool
61     ShouldNotify(lldb_private::Event *event_ptr);
62 };
63
64
65 //===----------------------------------------------------------------------===//
66 /// @class POSIXCrashStopInfo
67 /// @brief Represents the stop state of process that is ready to crash.
68 ///
69 class POSIXCrashStopInfo
70     : public POSIXStopInfo
71 {
72 public:
73     POSIXCrashStopInfo(POSIXThread &thread, uint32_t status,
74                        CrashReason reason,
75                        lldb::addr_t fault_addr);
76     ~POSIXCrashStopInfo();
77
78     lldb::StopReason
79     GetStopReason() const;
80 };
81
82 //===----------------------------------------------------------------------===//
83 /// @class POSIXNewThreadStopInfo
84 /// @brief Represents the stop state of process when a new thread is spawned.
85 ///
86
87 class POSIXNewThreadStopInfo
88     : public POSIXStopInfo
89 {
90 public:
91     POSIXNewThreadStopInfo (POSIXThread &thread)
92         : POSIXStopInfo (thread, 0)
93         { }
94
95     ~POSIXNewThreadStopInfo();
96
97     lldb::StopReason
98     GetStopReason() const;
99
100     const char *
101     GetDescription();
102
103     bool
104     ShouldStop(lldb_private::Event *event_ptr);
105
106     bool
107     ShouldNotify(lldb_private::Event *event_ptr);
108 };
109
110 #endif