1 //===-- UnixSignals.h -------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef lldb_UnixSignals_h_
11 #define lldb_UnixSignals_h_
18 // Other libraries and framework includes
20 #include "lldb/lldb-private.h"
21 #include "lldb/Core/ConstString.h"
23 namespace lldb_private
29 //------------------------------------------------------------------
30 // Constructors and Destructors
31 //------------------------------------------------------------------
38 GetSignalAsCString (int32_t signo) const;
41 SignalIsValid (int32_t signo) const;
44 GetSignalNumberFromName (const char *name) const;
47 GetSignalInfo (int32_t signo,
48 bool &should_suppress,
50 bool &should_notify) const;
53 GetShouldSuppress (int32_t signo) const;
56 SetShouldSuppress (int32_t signo,
60 SetShouldSuppress (const char *signal_name,
64 GetShouldStop (int32_t signo) const;
67 SetShouldStop (int32_t signo,
70 SetShouldStop (const char *signal_name,
74 GetShouldNotify (int32_t signo) const;
77 SetShouldNotify (int32_t signo, bool value);
80 SetShouldNotify (const char *signal_name,
83 // These provide an iterator through the signals available on this system.
84 // Call GetFirstSignalNumber to get the first entry, then iterate on GetNextSignalNumber
85 // till you get back LLDB_INVALID_SIGNAL_NUMBER.
87 GetFirstSignalNumber () const;
90 GetNextSignalNumber (int32_t current_signal) const;
92 // We assume that the elements of this object are constant once it is constructed,
93 // since a process should never need to add or remove symbols as it runs. So don't
94 // call these functions anywhere but the constructor of your subclass of UnixSignals or in
95 // your Process Plugin's GetUnixSignals method before you return the UnixSignal object.
100 const char *short_name,
101 bool default_suppress,
104 const char *description);
107 RemoveSignal (int signo);
110 //------------------------------------------------------------------
111 // Classes that inherit from UnixSignals can see and modify these
112 //------------------------------------------------------------------
117 ConstString m_short_name;
118 std::string m_description;
123 Signal (const char *name,
124 const char *short_name,
125 bool default_suppress,
128 const char *description);
136 typedef std::map <int32_t, Signal> collection;
138 collection m_signals;
140 DISALLOW_COPY_AND_ASSIGN (UnixSignals);
144 #endif // lldb_UnixSignals_h_