]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - source/Plugins/Process/FreeBSD/POSIXStopInfo.h
Vendor import of lldb trunk r290819:
[FreeBSD/FreeBSD.git] / 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 "FreeBSDThread.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 : public lldb_private::StopInfo {
29 public:
30   POSIXStopInfo(lldb_private::Thread &thread, uint32_t status)
31       : StopInfo(thread, status) {}
32 };
33
34 //===----------------------------------------------------------------------===//
35 /// @class POSIXLimboStopInfo
36 /// @brief Represents the stop state of a process ready to exit.
37 ///
38 class POSIXLimboStopInfo : public POSIXStopInfo {
39 public:
40   POSIXLimboStopInfo(FreeBSDThread &thread) : POSIXStopInfo(thread, 0) {}
41
42   ~POSIXLimboStopInfo();
43
44   lldb::StopReason GetStopReason() const;
45
46   const char *GetDescription();
47
48   bool ShouldStop(lldb_private::Event *event_ptr);
49
50   bool ShouldNotify(lldb_private::Event *event_ptr);
51 };
52
53 //===----------------------------------------------------------------------===//
54 /// @class POSIXCrashStopInfo
55 /// @brief Represents the stop state of process that is ready to crash.
56 ///
57 class POSIXCrashStopInfo : public POSIXStopInfo {
58 public:
59   POSIXCrashStopInfo(FreeBSDThread &thread, uint32_t status, CrashReason reason,
60                      lldb::addr_t fault_addr);
61   ~POSIXCrashStopInfo();
62
63   lldb::StopReason GetStopReason() const;
64 };
65
66 //===----------------------------------------------------------------------===//
67 /// @class POSIXNewThreadStopInfo
68 /// @brief Represents the stop state of process when a new thread is spawned.
69 ///
70
71 class POSIXNewThreadStopInfo : public POSIXStopInfo {
72 public:
73   POSIXNewThreadStopInfo(FreeBSDThread &thread) : POSIXStopInfo(thread, 0) {}
74
75   ~POSIXNewThreadStopInfo();
76
77   lldb::StopReason GetStopReason() const;
78
79   const char *GetDescription();
80
81   bool ShouldStop(lldb_private::Event *event_ptr);
82
83   bool ShouldNotify(lldb_private::Event *event_ptr);
84 };
85
86 #endif