#ifndef lldb_UnixSignals_h_
#define lldb_UnixSignals_h_
#include <string>
#include <map>
#include "lldb/lldb-private.h"
#include "lldb/Core/ConstString.h"
namespace lldb_private
{
class UnixSignals
{
public:
UnixSignals();
virtual
~UnixSignals();
const char *
GetSignalAsCString (int32_t signo) const;
bool
SignalIsValid (int32_t signo) const;
int32_t
GetSignalNumberFromName (const char *name) const;
const char *
GetSignalInfo (int32_t signo,
bool &should_suppress,
bool &should_stop,
bool &should_notify) const;
bool
GetShouldSuppress (int32_t signo) const;
bool
SetShouldSuppress (int32_t signo,
bool value);
bool
SetShouldSuppress (const char *signal_name,
bool value);
bool
GetShouldStop (int32_t signo) const;
bool
SetShouldStop (int32_t signo,
bool value);
bool
SetShouldStop (const char *signal_name,
bool value);
bool
GetShouldNotify (int32_t signo) const;
bool
SetShouldNotify (int32_t signo, bool value);
bool
SetShouldNotify (const char *signal_name,
bool value);
int32_t
GetFirstSignalNumber () const;
int32_t
GetNextSignalNumber (int32_t current_signal) const;
void
AddSignal (int signo,
const char *name,
const char *short_name,
bool default_suppress,
bool default_stop,
bool default_notify,
const char *description);
void
RemoveSignal (int signo);
protected:
struct Signal
{
ConstString m_name;
ConstString m_short_name;
std::string m_description;
bool m_suppress:1,
m_stop:1,
m_notify:1;
Signal (const char *name,
const char *short_name,
bool default_suppress,
bool default_stop,
bool default_notify,
const char *description);
~Signal () {}
};
void
Reset ();
typedef std::map <int32_t, Signal> collection;
collection m_signals;
DISALLOW_COPY_AND_ASSIGN (UnixSignals);
};
} #endif // lldb_UnixSignals_h_