LLDB mainline
ClangUserExpression.cpp File Reference
#include <cstdio>
#include <sys/types.h>
#include <cstdlib>
#include <map>
#include <string>
#include "ClangUserExpression.h"
#include "ASTResultSynthesizer.h"
#include "ClangASTMetadata.h"
#include "ClangDiagnostic.h"
#include "ClangExpressionDeclMap.h"
#include "ClangExpressionParser.h"
#include "ClangModulesDeclVendor.h"
#include "ClangPersistentVariables.h"
#include "CppModuleConfiguration.h"
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/Module.h"
#include "lldb/Expression/ExpressionSourceCode.h"
#include "lldb/Expression/IRExecutionUnit.h"
#include "lldb/Expression/IRInterpreter.h"
#include "lldb/Expression/Materializer.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Symbol/Block.h"
#include "lldb/Symbol/CompileUnit.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Symbol/VariableList.h"
#include "lldb/Target/ExecutionContext.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/StackFrame.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/ThreadPlan.h"
#include "lldb/Target/ThreadPlanCallUserExpression.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/StreamString.h"
#include "lldb/ValueObject/ValueObjectConstResult.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/BinaryFormat/Dwarf.h"

Go to the source code of this file.

Functions

static void ApplyObjcCastHack (std::string &expr)
static void SetupDeclVendor (ExecutionContext &exe_ctx, Target *target, DiagnosticManager &diagnostic_manager)
static bool SupportsCxxModuleImport (lldb::LanguageType language)
static CppModuleConfiguration LogConfigError (const std::string &msg)
 Utility method that puts a message into the expression log and returns an invalid module configuration.
CppModuleConfiguration GetModuleConfig (lldb::LanguageType language, ExecutionContext &exe_ctx)
static bool shouldRetryWithCppModule (Target &target, ExecutionPolicy exe_policy)
static void AbsPosToLineColumnPos (size_t abs_pos, llvm::StringRef code, unsigned &line, unsigned &column)
 Converts an absolute position inside a given code string into a column/line pair.

Function Documentation

◆ AbsPosToLineColumnPos()

void AbsPosToLineColumnPos ( size_t abs_pos,
llvm::StringRef code,
unsigned & line,
unsigned & column )
static

Converts an absolute position inside a given code string into a column/line pair.

Parameters
[in]abs_posA absolute position in the code string that we want to convert to a column/line pair.
[in]codeA multi-line string usually representing source code.
[out]lineThe line in the code that contains the given absolute position. The first line in the string is indexed as 1.
[out]columnThe column in the line that contains the absolute position. The first character in a line is indexed as 0.

Definition at line 761 of file ClangUserExpression.cpp.

Referenced by lldb_private::ClangUserExpression::Complete().

◆ ApplyObjcCastHack()

void ApplyObjcCastHack ( std::string & expr)
static

◆ GetModuleConfig()

◆ LogConfigError()

CppModuleConfiguration LogConfigError ( const std::string & msg)
static

Utility method that puts a message into the expression log and returns an invalid module configuration.

Definition at line 457 of file ClangUserExpression.cpp.

References lldb_private::Expressions, lldb_private::GetLog(), and LLDB_LOG.

Referenced by GetModuleConfig().

◆ SetupDeclVendor()

◆ shouldRetryWithCppModule()

◆ SupportsCxxModuleImport()