Go to the documentation of this file.
9 #ifndef LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONSOURCECODE_H
10 #define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONSOURCECODE_H
15 #include "llvm/ADT/ArrayRef.h"
16 #include "llvm/ADT/StringRef.h"
22 class ExecutionContext;
46 llvm::StringRef prefix,
66 bool force_add_all_locals,
67 llvm::ArrayRef<std::string> modules)
const;
73 size_t &start_loc,
size_t &end_loc);
77 llvm::StringRef prefix, llvm::StringRef body,
@ ObjCInstanceMethod
Wrapped in an instance Objective-C method.
@ CppMemberFunction
Wrapped in a non-static member function of a C++ class.
void AddLocalVariableDecls(const lldb::VariableListSP &var_list_sp, StreamString &stream, const std::string &expr) const
static const char * g_expression_suffix
std::string m_end_marker
String marking the end of the user expression.
static const llvm::StringRef g_prefix_file_name
The file name we use for the wrapper code that we inject before the user expression.
std::string m_start_marker
String marking the start of the user expression.
static const char * g_expression_prefix
bool GetText(std::string &text, ExecutionContext &exe_ctx, bool add_locals, bool force_add_all_locals, llvm::ArrayRef< std::string > modules) const
Generates the source code that will evaluate the expression.
bool GetOriginalBodyBounds(std::string transformed_text, size_t &start_loc, size_t &end_loc)
ClangExpressionSourceCode(llvm::StringRef filename, llvm::StringRef name, llvm::StringRef prefix, llvm::StringRef body, Wrapping wrap, WrapKind wrap_kind)
string(SUBSTRING ${p} 10 -1 pStripped) if($
WrapKind
The possible ways an expression can be wrapped.
@ ObjCStaticMethod
Wrapped in a static Objective-C method.
A class that represents a running process on the host machine.
static ClangExpressionSourceCode * CreateWrapped(llvm::StringRef filename, llvm::StringRef prefix, llvm::StringRef body, WrapKind wrap_kind)
const WrapKind m_wrap_kind
How the expression has been wrapped.