1 //===-- SBUnixSignals.h -----------------------------------------------*- C++ 2 //-*-===// 3 // 4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 // See https://llvm.org/LICENSE.txt for license information. 6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef LLDB_API_SBUNIXSIGNALS_H 11 #define LLDB_API_SBUNIXSIGNALS_H 12 13 #include "lldb/API/SBDefines.h" 14 15 namespace lldb { 16 17 class LLDB_API SBUnixSignals { 18 public: 19 SBUnixSignals(); 20 21 SBUnixSignals(const lldb::SBUnixSignals &rhs); 22 23 ~SBUnixSignals(); 24 25 const SBUnixSignals &operator=(const lldb::SBUnixSignals &rhs); 26 27 void Clear(); 28 29 explicit operator bool() const; 30 31 bool IsValid() const; 32 33 const char *GetSignalAsCString(int32_t signo) const; 34 35 int32_t GetSignalNumberFromName(const char *name) const; 36 37 bool GetShouldSuppress(int32_t signo) const; 38 39 bool SetShouldSuppress(int32_t signo, bool value); 40 41 bool GetShouldStop(int32_t signo) const; 42 43 bool SetShouldStop(int32_t signo, bool value); 44 45 bool GetShouldNotify(int32_t signo) const; 46 47 bool SetShouldNotify(int32_t signo, bool value); 48 49 int32_t GetNumSignals() const; 50 51 int32_t GetSignalAtIndex(int32_t index) const; 52 53 protected: 54 friend class SBProcess; 55 friend class SBPlatform; 56 57 SBUnixSignals(lldb::ProcessSP &process_sp); 58 59 SBUnixSignals(lldb::PlatformSP &platform_sp); 60 61 lldb::UnixSignalsSP GetSP() const; 62 63 void SetSP(const lldb::UnixSignalsSP &signals_sp); 64 65 private: 66 lldb::UnixSignalsWP m_opaque_wp; 67 }; 68 69 } // namespace lldb 70 71 #endif // LLDB_API_SBUNIXSIGNALS_H 72