#include "lldb/Expression/IRInterpreter.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/ValueObject.h"
#include "lldb/Expression/DiagnosticManager.h"
#include "lldb/Expression/IRExecutionUnit.h"
#include "lldb/Expression/IRMemoryMap.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/DataExtractor.h"
#include "lldb/Utility/Endian.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/Scalar.h"
#include "lldb/Utility/Status.h"
#include "lldb/Utility/StreamString.h"
#include "lldb/Target/ABI.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
#include "lldb/Target/ThreadPlan.h"
#include "lldb/Target/ThreadPlanCallFunctionUsingABI.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
#include "llvm/Support/raw_ostream.h"
#include <map>
usingnamespacellvm;
LLDBLog;
static std::string PrintValue(const Value *value, bool truncate = false) { … }
static std::string PrintType(const Type *type, bool truncate = false) { … }
static bool CanIgnoreCall(const CallInst *call) { … }
class InterpreterStackFrame { … };
static const char *unsupported_opcode_error = …;
static const char *unsupported_operand_error = …;
static const char *interpreter_internal_error = …;
static const char *interrupt_error = …;
static const char *bad_value_error = …;
static const char *memory_allocation_error = …;
static const char *memory_write_error = …;
static const char *memory_read_error = …;
static const char *timeout_error = …;
static const char *too_many_functions_error = …;
static bool CanResolveConstant(llvm::Constant *constant) { … }
bool IRInterpreter::CanInterpret(llvm::Module &module, llvm::Function &function,
lldb_private::Status &error,
const bool support_function_calls) { … }
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) { … }