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");
45 "can't run static initializers without a thread");
49 std::vector<addr_t> static_initializers;
51 execution_unit_sp->GetStaticInitializers(static_initializers);
53 for (
addr_t static_initializer : static_initializers) {
58 llvm::ArrayRef<addr_t>(), options));
63 exe_ctx, call_static_initializer, options, execution_errors);
A section + offset based address class.
Generic representation of a type in a programming language.
llvm::Error GetAsError(lldb::ExpressionResults result, llvm::Twine message={}) const
Returns an ExpressionError with arg as error code.
"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.
static Status FromErrorString(const char *str)
static Status FromError(llvm::Error error)
Avoid using this in new code. Migrate APIs to llvm::Expected instead.
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.