LLDB mainline
IRInterpreter.h
Go to the documentation of this file.
1//===-- IRInterpreter.h -----------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_EXPRESSION_IRINTERPRETER_H
10#define LLDB_EXPRESSION_IRINTERPRETER_H
11
13#include "lldb/Utility/Stream.h"
15#include "lldb/lldb-public.h"
16#include "llvm/ADT/ArrayRef.h"
17#include "llvm/Pass.h"
18
19namespace llvm {
20class Function;
21class Module;
22}
23
24namespace lldb_private {
25
26class IRMemoryMap;
27}
28
29/// \class IRInterpreter IRInterpreter.h "lldb/Expression/IRInterpreter.h"
30/// Attempt to interpret the function's code if it does not require
31/// running the target.
32///
33/// In some cases, the IR for an expression can be evaluated entirely in the
34/// debugger, manipulating variables but not executing any code in the target.
35/// The IRInterpreter attempts to do this.
37public:
38 static bool CanInterpret(llvm::Module &module, llvm::Function &function,
40 const bool support_function_calls);
41
42 static bool Interpret(llvm::Module &module, llvm::Function &function,
43 llvm::ArrayRef<lldb::addr_t> args,
44 lldb_private::IRExecutionUnit &execution_unit,
46 lldb::addr_t stack_frame_bottom,
47 lldb::addr_t stack_frame_top,
50
51private:
52 static bool supportsFunction(llvm::Function &llvm_function,
54};
55
56#endif
static llvm::raw_ostream & error(Stream &strm)
Attempt to interpret the function's code if it does not require running the target.
Definition: IRInterpreter.h:36
static bool supportsFunction(llvm::Function &llvm_function, lldb_private::Status &err)
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)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
"lldb/Expression/IRExecutionUnit.h" Contains the IR and, optionally, JIT- compiled code for a module.
An error handling class.
Definition: Status.h:115
A class that represents a running process on the host machine.
uint64_t addr_t
Definition: lldb-types.h:80
Definition: Debugger.h:54