9#ifndef LLDB_TARGET_UNIXSIGNALS_H
10#define LLDB_TARGET_UNIXSIGNALS_H
18#include "llvm/Support/JSON.h"
36 std::optional<int32_t> code = std::nullopt,
37 std::optional<lldb::addr_t> addr = std::nullopt,
38 std::optional<lldb::addr_t> lower = std::nullopt,
39 std::optional<lldb::addr_t> upper = std::nullopt)
const;
63 bool GetSignalInfo(int32_t signo,
bool &should_suppress,
bool &should_stop,
64 bool &should_notify)
const;
83 bool ResetSignal(int32_t signo,
bool reset_stop =
true,
84 bool reset_notify =
true,
bool reset_suppress =
true);
103 void AddSignal(
int signo, llvm::StringRef name,
bool default_suppress,
104 bool default_stop,
bool default_notify,
105 llvm::StringRef description,
106 llvm::StringRef alias = llvm::StringRef());
113 int signo,
int code,
const llvm::StringLiteral description,
139 std::optional<bool> should_stop,
140 std::optional<bool> should_notify);
161 Signal(llvm::StringRef name,
bool default_suppress,
bool default_stop,
162 bool default_notify, llvm::StringRef description,
163 llvm::StringRef alias);
166 void Reset(
bool reset_stop,
bool reset_notify,
bool reset_suppress);
169 llvm::StringRef
GetShortName(llvm::StringRef name)
const;
171 virtual void Reset();
An architecture specification class.
void AddSignalCode(int signo, int code, const llvm::StringLiteral description, SignalCodePrintOption print_option=SignalCodePrintOption::None)
llvm::StringRef GetShortName(llvm::StringRef name) const
int32_t GetSignalNumberFromName(const char *name) const
static lldb::UnixSignalsSP CreateForHost()
bool GetSignalInfo(int32_t signo, bool &should_suppress, bool &should_stop, bool &should_notify) const
Gets the information for a particular signal.
int32_t GetSignalAtIndex(int32_t index) const
bool GetShouldNotify(int32_t signo) const
std::vector< int32_t > GetFilteredSignals(std::optional< bool > should_suppress, std::optional< bool > should_stop, std::optional< bool > should_notify)
void IncrementSignalHitCount(int signo)
Track how many times signals are hit as stop reasons.
bool SetShouldStop(int32_t signo, bool value)
void AddSignal(int signo, llvm::StringRef name, bool default_suppress, bool default_stop, bool default_notify, llvm::StringRef description, llvm::StringRef alias=llvm::StringRef())
void RemoveSignal(int signo)
bool SetShouldSuppress(int32_t signo, bool value)
int32_t GetFirstSignalNumber() const
static lldb::UnixSignalsSP Create(const ArchSpec &arch)
int32_t GetNumSignals() const
bool ResetSignal(int32_t signo, bool reset_stop=true, bool reset_notify=true, bool reset_suppress=true)
bool SignalIsValid(int32_t signo) const
const UnixSignals & operator=(const UnixSignals &rhs)=delete
llvm::json::Value GetHitCountStatistics() const
Get the hit count statistics for signals.
std::map< int32_t, Signal > collection
int32_t GetNextSignalNumber(int32_t current_signal) const
bool SetShouldNotify(int32_t signo, bool value)
bool GetShouldSuppress(int32_t signo) const
llvm::StringRef GetSignalAsStringRef(int32_t signo) const
bool GetShouldStop(int32_t signo) const
std::string GetSignalDescription(int32_t signo, std::optional< int32_t > code=std::nullopt, std::optional< lldb::addr_t > addr=std::nullopt, std::optional< lldb::addr_t > lower=std::nullopt, std::optional< lldb::addr_t > upper=std::nullopt) const
uint64_t GetVersion() const
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::UnixSignals > UnixSignalsSP
const SignalCodePrintOption m_print_option
const llvm::StringLiteral m_description
std::map< int32_t, SignalCode > m_codes
llvm::StringRef m_description