Ed Maste | 703c3c8 | 2014-06-23 20:49:41 +0000 | [diff] [blame] | 1 | //===-- SWIG Interface for SBUnixSignals ------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | namespace lldb { |
| 11 | |
| 12 | %feature("docstring", |
| 13 | "Allows you to manipulate LLDB's signal disposition" |
| 14 | ) SBUnixSignals; |
| 15 | class SBUnixSignals |
| 16 | { |
| 17 | public: |
| 18 | SBUnixSignals (); |
| 19 | |
| 20 | SBUnixSignals (const lldb::SBUnixSignals &rhs); |
| 21 | |
| 22 | ~SBUnixSignals(); |
| 23 | |
| 24 | void |
| 25 | Clear (); |
| 26 | |
| 27 | bool |
| 28 | IsValid () const; |
| 29 | |
| 30 | const char * |
| 31 | GetSignalAsCString (int32_t signo) const; |
| 32 | |
| 33 | int32_t |
| 34 | GetSignalNumberFromName (const char *name) const; |
| 35 | |
| 36 | bool |
| 37 | GetShouldSuppress (int32_t signo) const; |
| 38 | |
| 39 | bool |
| 40 | SetShouldSuppress (int32_t signo, |
| 41 | bool value); |
| 42 | |
| 43 | bool |
| 44 | GetShouldStop (int32_t signo) const; |
| 45 | |
| 46 | bool |
| 47 | SetShouldStop (int32_t signo, |
| 48 | bool value); |
| 49 | |
| 50 | bool |
| 51 | GetShouldNotify (int32_t signo) const; |
| 52 | |
| 53 | bool |
| 54 | SetShouldNotify (int32_t signo, bool value); |
| 55 | |
| 56 | int32_t |
| 57 | GetNumSignals () const; |
| 58 | |
| 59 | int32_t |
| 60 | GetSignalAtIndex (int32_t index) const; |
| 61 | |
| 62 | %pythoncode %{ |
| 63 | def get_unix_signals_list(self): |
| 64 | signals = [] |
| 65 | for idx in range(0, self.GetNumSignals()): |
| 66 | signals.append(self.GetSignalAtIndex(sig)) |
| 67 | return signals |
| 68 | |
| 69 | __swig_getmethods__["signals"] = get_unix_signals_list |
| 70 | if _newclass: threads = property(get_unix_signals_list, None, doc='''A read only property that returns a list() of valid signal numbers for this platform.''') |
| 71 | %} |
| 72 | }; |
| 73 | |
| 74 | } // namespace lldb |