]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/API/SBUnixSignals.h
MFV r323790: 8567 Inconsistent return value in zpool_read_label
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / API / SBUnixSignals.h
1 //===-- SBUnixSignals.h -----------------------------------------------*- C++
2 //-*-===//
3 //
4 //                     The LLVM Compiler Infrastructure
5 //
6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10
11 #ifndef LLDB_SBUnixSignals_h_
12 #define LLDB_SBUnixSignals_h_
13
14 #include "lldb/API/SBDefines.h"
15
16 namespace lldb {
17
18 class LLDB_API SBUnixSignals {
19 public:
20   SBUnixSignals();
21
22   SBUnixSignals(const lldb::SBUnixSignals &rhs);
23
24   ~SBUnixSignals();
25
26   const SBUnixSignals &operator=(const lldb::SBUnixSignals &rhs);
27
28   void Clear();
29
30   bool IsValid() const;
31
32   const char *GetSignalAsCString(int32_t signo) const;
33
34   int32_t GetSignalNumberFromName(const char *name) const;
35
36   bool GetShouldSuppress(int32_t signo) const;
37
38   bool SetShouldSuppress(int32_t signo, bool value);
39
40   bool GetShouldStop(int32_t signo) const;
41
42   bool SetShouldStop(int32_t signo, bool value);
43
44   bool GetShouldNotify(int32_t signo) const;
45
46   bool SetShouldNotify(int32_t signo, bool value);
47
48   int32_t GetNumSignals() const;
49
50   int32_t GetSignalAtIndex(int32_t index) const;
51
52 protected:
53   friend class SBProcess;
54   friend class SBPlatform;
55
56   SBUnixSignals(lldb::ProcessSP &process_sp);
57
58   SBUnixSignals(lldb::PlatformSP &platform_sp);
59
60   lldb::UnixSignalsSP GetSP() const;
61
62   void SetSP(const lldb::UnixSignalsSP &signals_sp);
63
64 private:
65   lldb::UnixSignalsWP m_opaque_wp;
66 };
67
68 } // namespace lldb
69
70 #endif // LLDB_SBUnixSignals_h_