9#ifndef LLDB_EXPRESSION_EXPRESSION_H
10#define LLDB_EXPRESSION_EXPRESSION_H
16#include "llvm/Support/FormatProviders.h"
45 virtual const char *
Text() = 0;
85 virtual bool isA(
const void *ClassID)
const = 0;
134 static llvm::Expected<FunctionCallLabel>
fromString(llvm::StringRef label);
158 raw_ostream &OS, StringRef Style);
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
"lldb/Expression/ExpressionTypeSystemHelper.h" A helper object that the Expression can pass to its Ex...
virtual bool NeedsValidation()=0
Flags.
virtual const char * Text()=0
Return the string that the parser should parse.
lldb::addr_t m_jit_end_addr
The address of the JITted function within the JIT allocation.
virtual SourceLanguage Language() const
Return the language that should be used when parsing.
lldb::ProcessWP m_jit_process_wp
Expression's always have to have a target...
lldb::addr_t m_jit_start_addr
An expression might have a process, but it doesn't need to (e.g.
lldb::TargetWP m_target_wp
lldb::addr_t StartAddress()
Return the address of the function's JIT-compiled code, or LLDB_INVALID_ADDRESS if the function is no...
virtual void DidFinishExecuting()
Called to notify the expression that its execution has finished.
virtual EvaluateExpressionOptions * GetOptions()
virtual ResultType DesiredResultType() const
Return the desired result type of the function, or eResultTypeAny if indifferent.
virtual bool isA(const void *ClassID) const =0
virtual bool NeedsVariableResolution()=0
Return true if external variables in the expression should be resolved.
virtual ExpressionTypeSystemHelper * GetTypeSystemHelper()
virtual const char * FunctionName()=0
Return the function name that should be used for executing the expression.
virtual Materializer * GetMaterializer()
Return the Materializer that the parser should use when registering external values.
virtual void WillStartExecuting()
Called to notify the expression that it is about to be executed.
Expression(Target &target)
virtual ~Expression()=default
Destructor.
A class that represents a running process on the host machine.
constexpr llvm::StringRef FunctionCallLabelPrefix
LLDB attaches this prefix to mangled names of functions that get called from JITted expressions.
std::weak_ptr< lldb_private::Process > ProcessWP
std::weak_ptr< lldb_private::Target > TargetWP
Holds parsed information about a function call label that LLDB attaches as an AsmLabel to function AS...
lldb::user_id_t symbol_id
Unique identifier of the function symbol on which to perform the function call.
std::string toString() const
Encode this FunctionCallLabel into its string representation.
llvm::StringRef discriminator
Arbitrary string which language plugins can interpret for their own needs.
llvm::StringRef lookup_name
Name to use when searching for the function symbol in module_id.
static llvm::Expected< FunctionCallLabel > fromString(llvm::StringRef label)
Decodes the specified function label into a FunctionCallLabel.
lldb::user_id_t module_id
Unique identifier of the lldb_private::Module which contains the symbol identified by symbol_id.
A type-erased pair of llvm::dwarf::SourceLanguageName and version.