LLDB mainline
|
#include <CPlusPlusLanguage.h>
Classes | |
class | MethodName |
Public Member Functions | |
CPlusPlusLanguage ()=default | |
~CPlusPlusLanguage () override=default | |
lldb::LanguageType | GetLanguageType () const override |
llvm::StringRef | GetUserEntryPointName () const override |
std::unique_ptr< TypeScavenger > | GetTypeScavenger () override |
lldb::TypeCategoryImplSP | GetFormatters () override |
HardcodedFormatters::HardcodedSummaryFinder | GetHardcodedSummaries () override |
HardcodedFormatters::HardcodedSyntheticFinder | GetHardcodedSynthetics () override |
bool | IsNilReference (ValueObject &valobj) override |
llvm::StringRef | GetNilReferenceSummaryString () override |
Returns the summary string for ValueObjects for which IsNilReference() is true. | |
bool | IsSourceFile (llvm::StringRef file_path) const override |
const Highlighter * | GetHighlighter () const override |
bool | SymbolNameFitsToLanguage (Mangled mangled) const override |
Returns true iff the given symbol name is compatible with the mangling scheme of this language. | |
bool | DemangledNameContainsPath (llvm::StringRef path, ConstString demangled) const override |
ConstString | GetDemangledFunctionNameWithoutArguments (Mangled mangled) const override |
bool | GetFunctionDisplayName (const SymbolContext *sc, const ExecutionContext *exe_ctx, FunctionNameRepresentation representation, Stream &s) override |
std::vector< ConstString > | GenerateAlternateFunctionManglings (const ConstString mangled) const override |
ConstString | FindBestAlternateFunctionMangledName (const Mangled mangled, const SymbolContext &sym_ctx) const override |
llvm::StringRef | GetInstanceVariableName () override |
llvm::StringRef | GetPluginName () override |
Public Member Functions inherited from lldb_private::Language | |
~Language () override | |
virtual lldb::LanguageType | GetLanguageType () const =0 |
virtual llvm::StringRef | GetUserEntryPointName () const |
virtual bool | IsTopLevelFunction (Function &function) |
virtual bool | IsSourceFile (llvm::StringRef file_path) const =0 |
virtual const Highlighter * | GetHighlighter () const |
virtual lldb::TypeCategoryImplSP | GetFormatters () |
virtual HardcodedFormatters::HardcodedFormatFinder | GetHardcodedFormats () |
virtual HardcodedFormatters::HardcodedSummaryFinder | GetHardcodedSummaries () |
virtual HardcodedFormatters::HardcodedSyntheticFinder | GetHardcodedSynthetics () |
virtual std::vector< FormattersMatchCandidate > | GetPossibleFormattersMatches (ValueObject &valobj, lldb::DynamicValueType use_dynamic) |
virtual std::unique_ptr< TypeScavenger > | GetTypeScavenger () |
virtual const char * | GetLanguageSpecificTypeLookupHelp () |
virtual std::vector< Language::MethodNameVariant > | GetMethodNameVariants (ConstString method_name) const |
virtual bool | SymbolNameFitsToLanguage (Mangled name) const |
Returns true iff the given symbol name is compatible with the mangling scheme of this language. | |
virtual std::pair< llvm::StringRef, llvm::StringRef > | GetFormatterPrefixSuffix (llvm::StringRef type_hint) |
An individual data formatter may apply to several types and cross language boundaries. | |
virtual bool | DemangledNameContainsPath (llvm::StringRef path, ConstString demangled) const |
virtual DumpValueObjectOptions::DeclPrintingHelper | GetDeclPrintingHelper () |
virtual LazyBool | IsLogicalTrue (ValueObject &valobj, Status &error) |
virtual bool | IsNilReference (ValueObject &valobj) |
virtual llvm::StringRef | GetNilReferenceSummaryString () |
Returns the summary string for ValueObjects for which IsNilReference() is true. | |
virtual bool | IsUninitializedReference (ValueObject &valobj) |
virtual bool | GetFunctionDisplayName (const SymbolContext *sc, const ExecutionContext *exe_ctx, FunctionNameRepresentation representation, Stream &s) |
virtual ConstString | GetDemangledFunctionNameWithoutArguments (Mangled mangled) const |
virtual ConstString | GetDisplayDemangledName (Mangled mangled) const |
virtual void | GetExceptionResolverDescription (bool catch_on, bool throw_on, Stream &s) |
virtual std::vector< ConstString > | GenerateAlternateFunctionManglings (const ConstString mangled) const |
virtual ConstString | FindBestAlternateFunctionMangledName (const Mangled mangled, const SymbolContext &sym_ctx) const |
virtual llvm::StringRef | GetInstanceVariableName () |
virtual bool | IgnoreForLineBreakpoints (const SymbolContext &) const |
Returns true if this SymbolContext should be ignored when setting breakpoints by line (number or regex). | |
virtual bool | SupportsExceptionBreakpointsOnThrow () const |
Returns true if this Language supports exception breakpoints on throw via a corresponding LanguageRuntime plugin. | |
virtual bool | SupportsExceptionBreakpointsOnCatch () const |
Returns true if this Language supports exception breakpoints on catch via a corresponding LanguageRuntime plugin. | |
virtual llvm::StringRef | GetThrowKeyword () const |
Returns the keyword used for throw statements in this language, e.g. | |
virtual llvm::StringRef | GetCatchKeyword () const |
Returns the keyword used for catch statements in this language, e.g. | |
Public Member Functions inherited from lldb_private::PluginInterface | |
PluginInterface ()=default | |
virtual | ~PluginInterface ()=default |
virtual llvm::StringRef | GetPluginName ()=0 |
PluginInterface (const PluginInterface &)=delete | |
PluginInterface & | operator= (const PluginInterface &)=delete |
Static Public Member Functions | |
static void | Initialize () |
static void | Terminate () |
static lldb_private::Language * | CreateInstance (lldb::LanguageType language) |
static llvm::StringRef | GetPluginNameStatic () |
static bool | IsCPPMangledName (llvm::StringRef name) |
static bool | ExtractContextAndIdentifier (const char *name, llvm::StringRef &context, llvm::StringRef &identifier) |
Static Public Member Functions inherited from lldb_private::Language | |
static Language * | FindPlugin (lldb::LanguageType language) |
static Language * | FindPlugin (llvm::StringRef file_path) |
Returns the Language associated with the given file path or a nullptr if there is no known language. | |
static Language * | FindPlugin (lldb::LanguageType language, llvm::StringRef file_path) |
static void | ForEach (std::function< bool(Language *)> callback) |
static void | GetDefaultExceptionResolverDescription (bool catch_on, bool throw_on, Stream &s) |
static lldb::LanguageType | GetLanguageTypeFromString (const char *string)=delete |
static lldb::LanguageType | GetLanguageTypeFromString (llvm::StringRef string) |
static const char * | GetNameForLanguageType (lldb::LanguageType language) |
static void | PrintAllLanguages (Stream &s, const char *prefix, const char *suffix) |
static void | PrintSupportedLanguagesForExpressions (Stream &s, llvm::StringRef prefix, llvm::StringRef suffix) |
Prints to the specified stream 's' each language type that the current target supports for expression evaluation. | |
static void | ForAllLanguages (std::function< bool(lldb::LanguageType)> callback) |
static bool | LanguageIsCPlusPlus (lldb::LanguageType language) |
static bool | LanguageIsObjC (lldb::LanguageType language) |
static bool | LanguageIsC (lldb::LanguageType language) |
static bool | LanguageIsCFamily (lldb::LanguageType language) |
Equivalent to LanguageIsC||LanguageIsObjC||LanguageIsCPlusPlus . | |
static bool | LanguageIsPascal (lldb::LanguageType language) |
static lldb::LanguageType | GetPrimaryLanguage (lldb::LanguageType language) |
static std::set< lldb::LanguageType > | GetSupportedLanguages () |
static LanguageSet | GetLanguagesSupportingTypeSystems () |
static LanguageSet | GetLanguagesSupportingTypeSystemsForExpressions () |
static LanguageSet | GetLanguagesSupportingREPLs () |
static LanguageProperties & | GetGlobalLanguageProperties () |
Private Attributes | |
ClangHighlighter | m_highlighter |
Additional Inherited Members | |
Public Types inherited from lldb_private::Language | |
enum class | FunctionNameRepresentation { eName , eNameWithArgs , eNameWithNoArgs } |
Protected Member Functions inherited from lldb_private::Language | |
Language () | |
Definition at line 24 of file CPlusPlusLanguage.h.
|
default |
Referenced by CreateInstance().
|
overridedefault |
|
static |
Definition at line 101 of file CPlusPlusLanguage.cpp.
References CPlusPlusLanguage(), lldb::eLanguageTypeObjC_plus_plus, and lldb_private::Language::LanguageIsCPlusPlus().
Referenced by Terminate().
|
overridevirtual |
Reimplemented from lldb_private::Language.
Definition at line 390 of file CPlusPlusLanguage.cpp.
References lldb_private::CPlusPlusLanguage::MethodName::ContainsPath().
|
static |
Definition at line 396 of file CPlusPlusLanguage.cpp.
References MSVCUndecoratedNameParser::ExtractContextAndIdentifier(), MSVCUndecoratedNameParser::IsMSVCUndecoratedName(), and lldb_private::CPlusPlusNameParser::ParseAsFullName().
Referenced by lldb_private::CPlusPlusLanguage::MethodName::ContainsPath(), and lldb_private::plugin::dwarf::SymbolFileDWARF::FindGlobalVariables().
|
overridevirtual |
Reimplemented from lldb_private::Language.
Definition at line 585 of file CPlusPlusLanguage.cpp.
References lldb_private::CPlusPlusLanguage::MethodName::GetArguments(), lldb_private::Mangled::GetDemangledName(), lldb_private::SymbolFile::GetMangledNamesForFunction(), lldb_private::CPlusPlusLanguage::MethodName::GetQualifiers(), lldb_private::CPlusPlusLanguage::MethodName::GetScopeQualifiedName(), lldb_private::CPlusPlusLanguage::MethodName::IsValid(), and lldb_private::SymbolContext::module_sp.
|
overridevirtual |
Get a basic set of alternative manglings for the given symbol name
, by making a few basic possible substitutions on basic types, storage duration and const
ness for the given symbol. The output parameter alternates
is filled with a best-guess, non-exhaustive set of different manglings for the given name.
Reimplemented from lldb_private::Language.
Definition at line 531 of file CPlusPlusLanguage.cpp.
References lldb_private::ConstString::GetCString(), and lldb_private::ConstString::GetStringRef().
|
overridevirtual |
Reimplemented from lldb_private::Language.
Definition at line 70 of file CPlusPlusLanguage.cpp.
References lldb_private::CPlusPlusLanguage::MethodName::GetBasename(), lldb_private::CPlusPlusLanguage::MethodName::GetContext(), lldb_private::ConstString::GetCString(), lldb_private::Mangled::GetDemangledName(), and lldb_private::Mangled::GetMangledName().
|
overridevirtual |
Reimplemented from lldb_private::Language.
Definition at line 1549 of file CPlusPlusLanguage.cpp.
References lldb_private::DataVisualization::Categories::GetCategory(), GetPluginName(), LoadLibCxxFormatters(), LoadLibStdcppFormatters(), and LoadSystemFormatters().
|
overridevirtual |
Reimplemented from lldb_private::Language.
Definition at line 1700 of file CPlusPlusLanguage.cpp.
References lldb_private::VariableList::AppendVariablesWithScope(), lldb_private::ConstString::AsCString(), lldb_private::SymbolContext::block, lldb_private::Language::eNameWithArgs, lldb::eValueTypeVariableArgument, lldb_private::SymbolContext::function, lldb_private::ExecutionContext::GetBestExecutionContextScope(), lldb_private::Function::GetBlock(), lldb_private::Block::GetBlockVariableList(), lldb_private::Block::GetContainingInlinedBlock(), lldb_private::ConstString::GetCString(), lldb_private::Block::GetInlinedFunctionInfo(), lldb_private::InlineFunctionInfo::GetName(), lldb_private::Function::GetName(), lldb_private::Symbol::GetName(), lldb_private::VariableList::GetSize(), PrettyPrintFunctionNameWithArgs(), lldb_private::Stream::PutCString(), and lldb_private::SymbolContext::symbol.
|
overridevirtual |
Reimplemented from lldb_private::Language.
Definition at line 1566 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::BlockPointerSummaryProvider(), lldb_private::formatters::CXXFunctionPointerSummaryProvider(), lldb::eValueTypeVTableEntry, lldb_private::FormatManager::GetCategory(), lldb_private::ValueObject::GetCompilerType(), lldb_private::ValueObject::GetValueType(), lldb_private::CompilerType::IsBlockPointerType(), lldb_private::CompilerType::IsFunctionPointerType(), lldb_private::CompilerType::IsVectorType(), and lldb_private::formatters::VectorTypeSummaryProvider().
|
overridevirtual |
Reimplemented from lldb_private::Language.
Definition at line 1632 of file CPlusPlusLanguage.cpp.
References lldb_private::formatters::BlockPointerSyntheticFrontEndCreator(), lldb_private::FormatManager::GetCategory(), lldb_private::ValueObject::GetCompilerType(), lldb_private::CompilerType::IsBlockPointerType(), lldb_private::CompilerType::IsVectorType(), and lldb_private::formatters::VectorTypeSyntheticFrontEndCreator().
|
inlineoverridevirtual |
Reimplemented from lldb_private::Language.
Definition at line 122 of file CPlusPlusLanguage.h.
References m_highlighter.
|
inlineoverridevirtual |
Reimplemented from lldb_private::Language.
Definition at line 170 of file CPlusPlusLanguage.h.
|
inlineoverridevirtual |
Implements lldb_private::Language.
Definition at line 102 of file CPlusPlusLanguage.h.
References lldb::eLanguageTypeC_plus_plus.
|
inlineoverridevirtual |
Returns the summary string for ValueObjects for which IsNilReference() is true.
Reimplemented from lldb_private::Language.
Definition at line 118 of file CPlusPlusLanguage.h.
|
inlineoverridevirtual |
Implements lldb_private::PluginInterface.
Definition at line 173 of file CPlusPlusLanguage.h.
References GetPluginNameStatic().
Referenced by GetFormatters().
|
inlinestatic |
Definition at line 131 of file CPlusPlusLanguage.h.
Referenced by GetPluginName().
|
overridevirtual |
Reimplemented from lldb_private::Language.
Definition at line 1532 of file CPlusPlusLanguage.cpp.
References lldb_private::CompilerType::GetMinimumLanguage(), lldb_private::CompilerType::GetTypedefedType(), lldb_private::CompilerType::IsTypedefType(), lldb_private::Language::LanguageIsC(), and lldb_private::Language::LanguageIsCPlusPlus().
|
inlineoverridevirtual |
Reimplemented from lldb_private::Language.
Definition at line 106 of file CPlusPlusLanguage.h.
|
static |
Definition at line 56 of file CPlusPlusLanguage.cpp.
References lldb_private::PluginManager::RegisterPlugin().
|
static |
Definition at line 378 of file CPlusPlusLanguage.cpp.
References lldb_private::Mangled::eManglingSchemeNone, and lldb_private::Mangled::GetManglingScheme().
Referenced by lldb_private::ClangExpressionDeclMap::AddOneFunction(), SymbolFilePDB::CacheFunctionNames(), and SymbolNameFitsToLanguage().
|
overridevirtual |
Reimplemented from lldb_private::Language.
Definition at line 1678 of file CPlusPlusLanguage.cpp.
References lldb_private::ValueObject::GetObjectRuntimeLanguage(), lldb_private::ValueObject::GetValueAsUnsigned(), lldb_private::ValueObject::IsPointerType(), and lldb_private::Language::LanguageIsCPlusPlus().
|
overridevirtual |
Implements lldb_private::Language.
Definition at line 1687 of file CPlusPlusLanguage.cpp.
|
overridevirtual |
Returns true iff the given symbol name is compatible with the mangling scheme of this language.
This function should only return true if there is a high confidence that the name actually belongs to this language.
Reimplemented from lldb_private::Language.
Definition at line 65 of file CPlusPlusLanguage.cpp.
References lldb_private::ConstString::GetCString(), lldb_private::Mangled::GetMangledName(), and IsCPPMangledName().
|
static |
Definition at line 61 of file CPlusPlusLanguage.cpp.
References CreateInstance(), and lldb_private::PluginManager::UnregisterPlugin().
|
private |
Definition at line 25 of file CPlusPlusLanguage.h.
Referenced by GetHighlighter().