9#ifndef LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGUSEREXPRESSION_H
10#define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGUSEREXPRESSION_H
32class ClangExpressionParser;
47 bool isA(
const void *ClassID)
const override {
55 :
public llvm::RTTIExtends<ClangUserExpressionHelper,
56 ClangExpressionHelper> {
74 bool keep_result_in_memory,
153 bool keep_result_in_memory,
bool generate_debug_info)
override;
156 unsigned complete_pos)
override;
168 bool keep_result_in_memory) {
170 keep_result_in_memory,
190 bool keep_result_in_memory,
bool generate_debug_info);
203 std::vector<std::string> modules_to_import,
204 bool for_completion);
207 llvm::StringRef object_name,
Status &err);
"lldb/Expression/ClangExpressionDeclMap.h" Manages named entities that are defined in LLDB's debug in...
WrapKind
The possible ways an expression can be wrapped.
"lldb/Expression/ClangPersistentVariables.h" Manages persistent values that need to be preserved betw...
void CommitPersistentDecls() override
ClangExpressionDeclMap * DeclMap() override
Return the object that the parser should use when resolving external values.
ClangUserExpressionHelper(Target &target, bool top_level)
std::unique_ptr< ASTStructExtractor > m_struct_extractor_up
The class that generates the argument struct layout.
clang::ASTConsumer * ASTTransformer(clang::ASTConsumer *passthrough) override
Return the object that the parser should allow to access ASTs.
std::unique_ptr< ClangExpressionDeclMap > m_expr_decl_map_up
std::unique_ptr< ASTResultSynthesizer > m_result_synthesizer_up
lldb::TargetSP m_target_sp
PersistentExpressionState * m_persistent_state
void RegisterPersistentState(PersistentExpressionState *persistent_state)
lldb::ExpressionVariableSP & GetVariable()
void DidDematerialize(lldb::ExpressionVariableSP &variable) override
ConstString GetName() override
lldb::ExpressionVariableSP m_variable
ResultDelegate(lldb::TargetSP target)
"lldb/Expression/ClangUserExpression.h" Encapsulates a single expression for use with Clang
bool isA(const void *ClassID) const override
bool m_enforce_valid_object
True if the expression parser should enforce the presence of a valid class pointer in order to genera...
std::string m_filename
File name used for the expression.
lldb::ExpressionVariableSP GetResultAfterDematerialization(ExecutionContextScope *exe_scope) override
bool m_in_objectivec_method
True if the expression is compiled as an Objective-C method (true if it was parsed when exe_ctx was i...
void CreateSourceCode(DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx, std::vector< std::string > modules_to_import, bool for_completion)
static bool classof(const Expression *obj)
ClangExpressionSourceCode::WrapKind GetWrapKind() const
Defines how the current expression should be wrapped.
std::unique_ptr< ClangExpressionParser > m_parser
The parser instance we used to parse the expression.
void SetupCppModuleImports(ExecutionContext &exe_ctx)
~ClangUserExpression() override
bool PrepareForParsing(DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx, bool for_completion)
bool m_needs_object_ptr
True if "this" or "self" must be looked up and passed in.
ClangExpressionDeclMap * DeclMap()
ExpressionTypeSystemHelper * GetTypeSystemHelper() override
bool SetupPersistentState(DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx)
bool m_in_static_method
True if the expression is compiled as a static (or class) method (currently true if it was parsed whe...
bool Parse(DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx, lldb_private::ExecutionPolicy execution_policy, bool keep_result_in_memory, bool generate_debug_info) override
Parse the expression.
bool TryParse(DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx, lldb_private::ExecutionPolicy execution_policy, bool keep_result_in_memory, bool generate_debug_info)
Populate m_in_cplusplus_method and m_in_objectivec_method based on the environment.
void ResetDeclMap(ExecutionContext &exe_ctx, Materializer::PersistentVariableDelegate &result_delegate, bool keep_result_in_memory)
std::optional< size_t > m_user_expression_start_pos
The absolute character position in the transformed source code where the user code (as typed by the u...
bool DidImportCxxModules() const
Returns true iff this expression is using any imported C++ modules.
bool AddArguments(ExecutionContext &exe_ctx, std::vector< lldb::addr_t > &args, lldb::addr_t struct_address, DiagnosticManager &diagnostic_manager) override
lldb::addr_t GetCppObjectPointer(lldb::StackFrameSP frame, llvm::StringRef object_name, Status &err)
std::unique_ptr< ClangExpressionSourceCode > m_source_code
ResultDelegate m_result_delegate
std::vector< std::string > m_imported_cpp_modules
A list of module names that should be imported when parsing.
ClangUserExpressionHelper m_type_system_helper
ClangPersistentVariables * m_clang_state
void ScanContext(ExecutionContext &exe_ctx, lldb_private::Status &err) override
bool m_in_cplusplus_method
True if the expression is compiled as a C++ member function (true if it was parsed when exe_ctx was i...
std::vector< std::string > m_include_directories
The include directories that should be used when parsing the expression.
ValueObject * m_ctx_obj
The object (if any) in which context the expression is evaluated.
"lldb/Utility/ArgCompletionRequest.h"
A uniqued constant string class.
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
"lldb/Expression/ExpressionTypeSystemHelper.h" A helper object that the Expression can pass to its Ex...
Encapsulates a single expression for use in lldb.
virtual bool isA(const void *ClassID) const =0
"lldb/Expression/LLVMUserExpression.h" Encapsulates a one-time expression for use in lldb.
bool isA(const void *ClassID) const override
@ Complete
Editing complete, returns the complete set of edited lines.
A class that represents a running process on the host machine.
ExecutionPolicy
Expression execution policies.
std::shared_ptr< lldb_private::StackFrame > StackFrameSP
std::shared_ptr< lldb_private::ExpressionVariable > ExpressionVariableSP
std::shared_ptr< lldb_private::Target > TargetSP
A type-erased pair of llvm::dwarf::SourceLanguageName and version.