20 std::shared_ptr<IRExecutionUnit> &execution_unit_sp,
25 can_interpret, execution_policy);
37 if (!execution_unit_sp.get()) {
39 "can't run static initializers for a NULL execution unit");
44 err.
SetErrorString(
"can't run static initializers without a thread");
48 std::vector<addr_t> static_initializers;
50 execution_unit_sp->GetStaticInitializers(static_initializers);
52 for (
addr_t static_initializer : static_initializers) {
57 llvm::ArrayRef<addr_t>(), options));
62 exe_ctx, call_static_initializer, options, execution_errors);
A section + offset based address class.
Generic representation of a type in a programming language.
std::string GetString(char separator='\n')
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
bool HasThreadScope() const
Returns true the ExecutionContext object contains a valid target, process, and thread.
Process * GetProcessPtr() const
Returns a pointer to the process object.
Thread & GetThreadRef() const
Returns a reference to the thread object.
Status RunStaticInitializers(lldb::IRExecutionUnitSP &execution_unit_sp, ExecutionContext &exe_ctx)
Run all static initializers for an execution unit.
virtual Status DoPrepareForExecution(lldb::addr_t &func_addr, lldb::addr_t &func_end, std::shared_ptr< IRExecutionUnit > &execution_unit_sp, ExecutionContext &exe_ctx, bool &can_interpret, lldb_private::ExecutionPolicy execution_policy)=0
Status PrepareForExecution(lldb::addr_t &func_addr, lldb::addr_t &func_end, std::shared_ptr< IRExecutionUnit > &execution_unit_sp, ExecutionContext &exe_ctx, bool &can_interpret, lldb_private::ExecutionPolicy execution_policy)
Ready an already-parsed expression for execution, possibly evaluating it statically.
int SetErrorStringWithFormat(const char *format,...) __attribute__((format(printf
Set the current error string to a formatted error string.
void SetErrorString(llvm::StringRef err_str)
Set the current error string to err_str.
bool Success() const
Test for success condition.
lldb::ProcessSP GetProcess() const
A class that represents a running process on the host machine.
ExecutionPolicy
Expression execution policies.
std::shared_ptr< lldb_private::ThreadPlan > ThreadPlanSP
std::shared_ptr< lldb_private::IRExecutionUnit > IRExecutionUnitSP
ExpressionResults
The results of expression evaluation.