14#include "llvm/Support/ErrorHandling.h"
58 llvm::report_fatal_error(
59 "PolicyStack::Guard destroyed on a different thread than the one "
67 llvm::report_fatal_error(
"PolicyStack::Guard moved across threads");
68 other.m_active =
false;
73 if (other.m_active && other.m_thread_id != std::this_thread::get_id())
74 llvm::report_fatal_error(
"PolicyStack::Guard moved across threads");
77 llvm::report_fatal_error(
78 "PolicyStack::Guard destroyed on a different thread than the "
79 "one that created it");
84 other.m_active =
false;
91 s <<
", capabilities={";
92 s <<
"eval_expr=" <<
capabilities.can_evaluate_expressions;
95 s <<
" bp_actions=" <<
capabilities.can_run_breakpoint_actions;
96 s <<
" frame_providers=" <<
capabilities.can_load_frame_providers;
97 s <<
" frame_recognizers=" <<
capabilities.can_run_frame_recognizers;
103 for (
size_t i = 0; i <
m_stack.size(); i++) {
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
RAII guard that pops a policy on destruction.
std::thread::id m_thread_id
Guard & operator=(Guard &&other)
void Dump(Stream &s) const
static PolicyStack & Get()
llvm::SmallVector< Policy > m_stack
const char * GetData() const
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
bool can_load_frame_providers
bool can_run_breakpoint_actions
bool can_run_frame_recognizers
Describes what view of the process a thread should see and what operations it is allowed to perform.
static Policy CreatePublicState()
Capabilities capabilities
@ Public
Provider-augmented frames, public state, public run lock.
@ Private
Parent (unwinder) frames, private state, private run lock.
void Dump(Stream &s) const
PrivateStatePurpose
Why a private-state policy is being pushed.
static Policy CreatePublicStateRunningExpression()
static Policy CreatePrivateState(PrivateStatePurpose purpose=PrivateStatePurpose::Default)