1//===-- SWIG Interface for SBUnixSignals ------------------------*- 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
9namespace lldb {
10
11%feature("docstring",
12"Allows you to manipulate LLDB's signal disposition"
13) SBUnixSignals;
14class SBUnixSignals
15{
16public:
17    SBUnixSignals ();
18
19    SBUnixSignals (const lldb::SBUnixSignals &rhs);
20
21    ~SBUnixSignals();
22
23    void
24    Clear ();
25
26    bool
27    IsValid () const;
28
29    explicit operator bool() const;
30
31    const char *
32    GetSignalAsCString (int32_t signo) const;
33
34    int32_t
35    GetSignalNumberFromName (const char *name) const;
36
37    bool
38    GetShouldSuppress (int32_t signo) const;
39
40    bool
41    SetShouldSuppress (int32_t signo,
42                       bool value);
43
44    bool
45    GetShouldStop (int32_t signo) const;
46
47    bool
48    SetShouldStop (int32_t signo,
49                   bool value);
50
51    bool
52    GetShouldNotify (int32_t signo) const;
53
54    bool
55    SetShouldNotify (int32_t signo, bool value);
56
57    int32_t
58    GetNumSignals () const;
59
60    int32_t
61    GetSignalAtIndex (int32_t index) const;
62
63#ifdef SWIGPYTHON
64    %pythoncode %{
65        def get_unix_signals_list(self):
66            signals = []
67            for idx in range(0, self.GetNumSignals()):
68                signals.append(self.GetSignalAtIndex(sig))
69            return signals
70
71        threads = property(get_unix_signals_list, None, doc='''A read only property that returns a list() of valid signal numbers for this platform.''')
72    %}
73#endif
74};
75
76}  // namespace lldb
77