1 //===-- POSIXStopInfo.h -----------------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef liblldb_POSIXStopInfo_H_ 10 #define liblldb_POSIXStopInfo_H_ 11 12 #include "FreeBSDThread.h" 13 #include "Plugins/Process/POSIX/CrashReason.h" 14 #include "lldb/Target/StopInfo.h" 15 #include <string> 16 17 //===----------------------------------------------------------------------===// 18 /// \class POSIXStopInfo 19 /// Simple base class for all POSIX-specific StopInfo objects. 20 /// 21 class POSIXStopInfo : public lldb_private::StopInfo { 22 public: POSIXStopInfo(lldb_private::Thread & thread,uint32_t status)23 POSIXStopInfo(lldb_private::Thread &thread, uint32_t status) 24 : StopInfo(thread, status) {} 25 }; 26 27 //===----------------------------------------------------------------------===// 28 /// \class POSIXLimboStopInfo 29 /// Represents the stop state of a process ready to exit. 30 /// 31 class POSIXLimboStopInfo : public POSIXStopInfo { 32 public: POSIXLimboStopInfo(FreeBSDThread & thread)33 POSIXLimboStopInfo(FreeBSDThread &thread) : POSIXStopInfo(thread, 0) {} 34 35 ~POSIXLimboStopInfo(); 36 37 lldb::StopReason GetStopReason() const override; 38 39 const char *GetDescription() override; 40 41 bool ShouldStop(lldb_private::Event *event_ptr) override; 42 43 bool ShouldNotify(lldb_private::Event *event_ptr) override; 44 }; 45 46 //===----------------------------------------------------------------------===// 47 /// \class POSIXNewThreadStopInfo 48 /// Represents the stop state of process when a new thread is spawned. 49 /// 50 51 class POSIXNewThreadStopInfo : public POSIXStopInfo { 52 public: POSIXNewThreadStopInfo(FreeBSDThread & thread)53 POSIXNewThreadStopInfo(FreeBSDThread &thread) : POSIXStopInfo(thread, 0) {} 54 55 ~POSIXNewThreadStopInfo(); 56 57 lldb::StopReason GetStopReason() const override; 58 59 const char *GetDescription() override; 60 61 bool ShouldStop(lldb_private::Event *event_ptr) override; 62 63 bool ShouldNotify(lldb_private::Event *event_ptr) override; 64 }; 65 66 #endif 67