LLDB  mainline
Static Public Member Functions | List of all members
IRInterpreter Class Reference

Attempt to interpret the function's code if it does not require running the target. More...

#include "lldb/Expression/IRInterpreter.h"

Static Public Member Functions

static bool CanInterpret (llvm::Module &module, llvm::Function &function, lldb_private::Status &error, const bool support_function_calls)
 
static bool Interpret (llvm::Module &module, llvm::Function &function, llvm::ArrayRef< lldb::addr_t > args, lldb_private::IRExecutionUnit &execution_unit, lldb_private::Status &error, lldb::addr_t stack_frame_bottom, lldb::addr_t stack_frame_top, lldb_private::ExecutionContext &exe_ctx)
 

Detailed Description

Attempt to interpret the function's code if it does not require running the target.

In some cases, the IR for an expression can be evaluated entirely in the debugger, manipulating variables but not executing any code in the target. The IRInterpreter attempts to do this.

Definition at line 36 of file IRInterpreter.h.

Member Function Documentation

◆ CanInterpret()

bool IRInterpreter::CanInterpret ( llvm::Module &  module,
llvm::Function &  function,
lldb_private::Status error,
const bool  support_function_calls 
)
static

◆ Interpret()

bool IRInterpreter::Interpret ( llvm::Module &  module,
llvm::Function &  function,
llvm::ArrayRef< lldb::addr_t args,
lldb_private::IRExecutionUnit execution_unit,
lldb_private::Status error,
lldb::addr_t  stack_frame_bottom,
lldb::addr_t  stack_frame_top,
lldb_private::ExecutionContext exe_ctx 
)
static

Definition at line 643 of file IRInterpreter.cpp.

References InterpreterStackFrame::AssignValue(), bad_value_error, CanIgnoreCall(), lldb_private::Status::Clear(), lldb_private::ABI::CallArgument::data_up, lldb::eExpressionCompleted, InterpreterStackFrame::EvaluateValue(), lldb_private::Status::Fail(), lldb_private::IRMemoryMap::Free(), lldb_private::IRMemoryMap::GetAllocSize(), lldb_private::DataBufferHeap::GetBytes(), lldb_private::DataBufferHeap::GetByteSize(), lldb_private::GetLogIfAllCategoriesSet(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::ExecutionContext::GetProcessRef(), lldb_private::Value::GetScalar(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::GetThreadRef(), lldb_private::ValueObject::GetValue(), lldb_private::ABI::CallArgument::HostPointer, infinite_loop_error, interpreter_internal_error, lldb_private::Scalar::IsZero(), InterpreterStackFrame::Jump(), LIBLLDB_LOG_EXPRESSIONS, LLDB_INVALID_ADDRESS, InterpreterStackFrame::m_frame_process_address, InterpreterStackFrame::m_ie, InterpreterStackFrame::m_ii, InterpreterStackFrame::m_prev_bb, InterpreterStackFrame::m_values, InterpreterStackFrame::MakeArgument(), lldb_private::Scalar::MakeSigned(), lldb_private::Scalar::MakeUnsigned(), InterpreterStackFrame::Malloc(), memory_allocation_error, memory_read_error, memory_write_error, lldb_private::Log::Printf(), PrintValue(), lldb_private::IRMemoryMap::ReadMemory(), lldb_private::IRMemoryMap::ReadPointerFromMemory(), InterpreterStackFrame::ResolveValue(), lldb_private::Process::RunThreadPlan(), lldb_private::Status::SetErrorString(), lldb_private::Status::SetErrorStringWithFormat(), lldb_private::Status::SetErrorToGenericError(), lldb_private::Process::SetRunningUserExpression(), lldb_private::Scalar::ShiftRightLogical(), lldb_private::ABI::CallArgument::size, lldb_private::Scalar::SLongLong(), lldb_private::Status::Success(), InterpreterStackFrame::SummarizeValue(), lldb_private::ABI::CallArgument::TargetValue, lldb_private::ABI::CallArgument::type, lldb_private::Scalar::ULongLong(), unsupported_opcode_error, lldb_private::ABI::CallArgument::value, lldb_private::IRMemoryMap::WriteMemory(), and lldb_private::IRMemoryMap::WritePointerToMemory().

Referenced by lldb_private::LLVMUserExpression::DoExecute().


The documentation for this class was generated from the following files: