1 //===-- POSIXStopInfo.h -----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_POSIXStopInfo_H_
11 #define liblldb_POSIXStopInfo_H_
15 // Other libraries and framework includes
17 #include "lldb/Target/StopInfo.h"
19 #include "POSIXThread.h"
20 #include "ProcessMessage.h"
22 //===----------------------------------------------------------------------===//
23 /// @class POSIXStopInfo
24 /// @brief Simple base class for all POSIX-specific StopInfo objects.
27 : public lldb_private::StopInfo
30 POSIXStopInfo(lldb_private::Thread &thread, uint32_t status)
31 : StopInfo(thread, status)
35 //===----------------------------------------------------------------------===//
36 /// @class POSIXLimboStopInfo
37 /// @brief Represents the stop state of a process ready to exit.
39 class POSIXLimboStopInfo
40 : public POSIXStopInfo
43 POSIXLimboStopInfo(POSIXThread &thread)
44 : POSIXStopInfo(thread, 0)
47 ~POSIXLimboStopInfo();
50 GetStopReason() const;
56 ShouldStop(lldb_private::Event *event_ptr);
59 ShouldNotify(lldb_private::Event *event_ptr);
63 //===----------------------------------------------------------------------===//
64 /// @class POSIXCrashStopInfo
65 /// @brief Represents the stop state of process that is ready to crash.
67 class POSIXCrashStopInfo
68 : public POSIXStopInfo
71 POSIXCrashStopInfo(POSIXThread &thread, uint32_t status,
72 ProcessMessage::CrashReason reason,
73 lldb::addr_t fault_addr)
74 : POSIXStopInfo(thread, status),
75 m_crash_reason(reason),
76 m_fault_addr(fault_addr)
79 ~POSIXCrashStopInfo();
82 GetStopReason() const;
88 ProcessMessage::CrashReason m_crash_reason;
89 lldb::addr_t m_fault_addr;
92 //===----------------------------------------------------------------------===//
93 /// @class POSIXNewThreadStopInfo
94 /// @brief Represents the stop state of process when a new thread is spawned.
97 class POSIXNewThreadStopInfo
98 : public POSIXStopInfo
101 POSIXNewThreadStopInfo (POSIXThread &thread)
102 : POSIXStopInfo (thread, 0)
105 ~POSIXNewThreadStopInfo();
108 GetStopReason() const;
114 ShouldStop(lldb_private::Event *event_ptr);
117 ShouldNotify(lldb_private::Event *event_ptr);