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 "CrashReason.h"
20 #include "FreeBSDThread.h"
24 //===----------------------------------------------------------------------===//
25 /// @class POSIXStopInfo
26 /// @brief Simple base class for all POSIX-specific StopInfo objects.
28 class POSIXStopInfo : public lldb_private::StopInfo {
30 POSIXStopInfo(lldb_private::Thread &thread, uint32_t status)
31 : StopInfo(thread, status) {}
34 //===----------------------------------------------------------------------===//
35 /// @class POSIXLimboStopInfo
36 /// @brief Represents the stop state of a process ready to exit.
38 class POSIXLimboStopInfo : public POSIXStopInfo {
40 POSIXLimboStopInfo(FreeBSDThread &thread) : POSIXStopInfo(thread, 0) {}
42 ~POSIXLimboStopInfo();
44 lldb::StopReason GetStopReason() const;
46 const char *GetDescription();
48 bool ShouldStop(lldb_private::Event *event_ptr);
50 bool ShouldNotify(lldb_private::Event *event_ptr);
53 //===----------------------------------------------------------------------===//
54 /// @class POSIXCrashStopInfo
55 /// @brief Represents the stop state of process that is ready to crash.
57 class POSIXCrashStopInfo : public POSIXStopInfo {
59 POSIXCrashStopInfo(FreeBSDThread &thread, uint32_t status, CrashReason reason,
60 lldb::addr_t fault_addr);
61 ~POSIXCrashStopInfo();
63 lldb::StopReason GetStopReason() const;
66 //===----------------------------------------------------------------------===//
67 /// @class POSIXNewThreadStopInfo
68 /// @brief Represents the stop state of process when a new thread is spawned.
71 class POSIXNewThreadStopInfo : public POSIXStopInfo {
73 POSIXNewThreadStopInfo(FreeBSDThread &thread) : POSIXStopInfo(thread, 0) {}
75 ~POSIXNewThreadStopInfo();
77 lldb::StopReason GetStopReason() const;
79 const char *GetDescription();
81 bool ShouldStop(lldb_private::Event *event_ptr);
83 bool ShouldNotify(lldb_private::Event *event_ptr);