LLDB mainline
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, lldb_private::Timeout< std::micro > timeout)

Static Private Member Functions

static bool supportsFunction (llvm::Function &llvm_function, lldb_private::Status &err)

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,
lldb_private::Timeout< std::micro > timeout )
static

Definition at line 685 of file IRInterpreter.cpp.

References InterpreterStackFrame::AssignValue(), bad_value_error, CanIgnoreCall(), lldb_private::Status::Clear(), lldb_private::ABI::CallArgument::data_up, lldb::eExpressionCompleted, error(), InterpreterStackFrame::EvaluateValue(), lldb_private::IRMemoryMap::Free(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), lldb_private::IRMemoryMap::GetAllocSize(), lldb_private::WritableDataBuffer::GetBytes(), lldb_private::DataBufferHeap::GetByteSize(), lldb_private::Target::GetDebugger(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Value::GetScalar(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::ExecutionContext::GetThreadPtr(), lldb_private::ExecutionContext::GetThreadRef(), lldb_private::ValueObject::GetValue(), lldb_private::ABI::CallArgument::HostPointer, interpreter_internal_error, interrupt_error, INTERRUPT_REQUESTED, lldb_private::Scalar::IsZero(), InterpreterStackFrame::Jump(), LLDB_INVALID_ADDRESS, LLDB_LOGF, 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, PrintValue(), lldb_private::IRMemoryMap::ReadMemory(), lldb_private::IRMemoryMap::ReadPointerFromMemory(), InterpreterStackFrame::ResolveValue(), lldb_private::Process::RunThreadPlan(), lldb_private::Process::SetRunningUserExpression(), lldb_private::Scalar::ShiftRightLogical(), lldb_private::ABI::CallArgument::size, lldb_private::Status::Success(), InterpreterStackFrame::SummarizeValue(), lldb_private::ABI::CallArgument::TargetValue, timeout_error, lldb_private::ABI::CallArgument::type, lldb_private::Scalar::ULongLong(), unsupported_opcode_error, UNUSED_IF_ASSERT_DISABLED, lldb_private::ABI::CallArgument::value, lldb_private::IRMemoryMap::WriteMemory(), and lldb_private::IRMemoryMap::WritePointerToMemory().

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

◆ supportsFunction()

bool IRInterpreter::supportsFunction ( llvm::Function & llvm_function,
lldb_private::Status & err )
staticprivate

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