LLDB mainline
Classes | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
lldb_private::ObjCLanguage Class Reference

#include <ObjCLanguage.h>

Inheritance diagram for lldb_private::ObjCLanguage:
Inheritance graph
[legend]

Classes

class  MethodName
 

Public Member Functions

 ObjCLanguage ()=default
 
 ~ObjCLanguage () override=default
 
lldb::LanguageType GetLanguageType () const override
 
llvm::StringRef GetUserEntryPointName () const override
 
std::vector< Language::MethodNameVariantGetMethodNameVariants (ConstString method_name) const override
 
bool SymbolNameFitsToLanguage (Mangled mangled) const override
 Returns true iff the given symbol name is compatible with the mangling scheme of this language.
 
lldb::TypeCategoryImplSP GetFormatters () override
 
std::vector< FormattersMatchCandidateGetPossibleFormattersMatches (ValueObject &valobj, lldb::DynamicValueType use_dynamic) override
 
std::unique_ptr< TypeScavengerGetTypeScavenger () override
 
std::pair< llvm::StringRef, llvm::StringRef > GetFormatterPrefixSuffix (llvm::StringRef type_hint) override
 An individual data formatter may apply to several types and cross language boundaries.
 
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 HighlighterGetHighlighter () const override
 
llvm::StringRef GetInstanceVariableName () override
 
bool SupportsExceptionBreakpointsOnThrow () const override
 Returns true if this Language supports exception breakpoints on throw via a corresponding LanguageRuntime plugin.
 
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 HighlighterGetHighlighter () const
 
virtual lldb::TypeCategoryImplSP GetFormatters ()
 
virtual HardcodedFormatters::HardcodedFormatFinder GetHardcodedFormats ()
 
virtual HardcodedFormatters::HardcodedSummaryFinder GetHardcodedSummaries ()
 
virtual HardcodedFormatters::HardcodedSyntheticFinder GetHardcodedSynthetics ()
 
virtual std::vector< FormattersMatchCandidateGetPossibleFormattersMatches (ValueObject &valobj, lldb::DynamicValueType use_dynamic)
 
virtual std::unique_ptr< TypeScavengerGetTypeScavenger ()
 
virtual const char * GetLanguageSpecificTypeLookupHelp ()
 
virtual std::vector< Language::MethodNameVariantGetMethodNameVariants (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< ConstStringGenerateAlternateFunctionManglings (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
 
PluginInterfaceoperator= (const PluginInterface &)=delete
 

Static Public Member Functions

static void Initialize ()
 
static void Terminate ()
 
static lldb_private::LanguageCreateInstance (lldb::LanguageType language)
 
static llvm::StringRef GetPluginNameStatic ()
 
static bool IsPossibleObjCMethodName (const char *name)
 
static bool IsPossibleObjCSelector (const char *name)
 
- Static Public Member Functions inherited from lldb_private::Language
static LanguageFindPlugin (lldb::LanguageType language)
 
static LanguageFindPlugin (llvm::StringRef file_path)
 Returns the Language associated with the given file path or a nullptr if there is no known language.
 
static LanguageFindPlugin (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::LanguageTypeGetSupportedLanguages ()
 
static LanguageSet GetLanguagesSupportingTypeSystems ()
 
static LanguageSet GetLanguagesSupportingTypeSystemsForExpressions ()
 
static LanguageSet GetLanguagesSupportingREPLs ()
 
static LanguagePropertiesGetGlobalLanguageProperties ()
 

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 ()
 

Detailed Description

Definition at line 22 of file ObjCLanguage.h.

Constructor & Destructor Documentation

◆ ObjCLanguage()

lldb_private::ObjCLanguage::ObjCLanguage ( )
default

Referenced by CreateInstance().

◆ ~ObjCLanguage()

lldb_private::ObjCLanguage::~ObjCLanguage ( )
overridedefault

Member Function Documentation

◆ CreateInstance()

Language * ObjCLanguage::CreateInstance ( lldb::LanguageType  language)
static

Definition at line 54 of file ObjCLanguage.cpp.

References lldb::eLanguageTypeObjC, and ObjCLanguage().

Referenced by Terminate().

◆ GetFormatterPrefixSuffix()

std::pair< llvm::StringRef, llvm::StringRef > ObjCLanguage::GetFormatterPrefixSuffix ( llvm::StringRef  type_hint)
overridevirtual

An individual data formatter may apply to several types and cross language boundaries.

Each of those languages may want to customize the display of values of said types by appending proper prefix/suffix information in language-specific ways. This function returns that prefix and suffix.

Parameters
[in]type_hintA StringRef used to determine what the prefix and suffix should be. It is called a hint because some types may have multiple variants for which the prefix and/or suffix may vary.
Returns
A std::pair<StringRef, StringRef>, the first being the prefix and the second being the suffix. They may be empty.

Reimplemented from lldb_private::Language.

Definition at line 1002 of file ObjCLanguage.cpp.

◆ GetFormatters()

lldb::TypeCategoryImplSP ObjCLanguage::GetFormatters ( )
overridevirtual

◆ GetHighlighter()

const Highlighter * lldb_private::ObjCLanguage::GetHighlighter ( ) const
inlineoverridevirtual

Reimplemented from lldb_private::Language.

Definition at line 164 of file ObjCLanguage.h.

References m_highlighter.

◆ GetInstanceVariableName()

llvm::StringRef lldb_private::ObjCLanguage::GetInstanceVariableName ( )
inlineoverridevirtual

Reimplemented from lldb_private::Language.

Definition at line 195 of file ObjCLanguage.h.

◆ GetLanguageType()

lldb::LanguageType lldb_private::ObjCLanguage::GetLanguageType ( ) const
inlineoverridevirtual

Implements lldb_private::Language.

Definition at line 126 of file ObjCLanguage.h.

References lldb::eLanguageTypeObjC.

◆ GetMethodNameVariants()

std::vector< Language::MethodNameVariant > ObjCLanguage::GetMethodNameVariants ( ConstString  method_name) const
overridevirtual

◆ GetNilReferenceSummaryString()

llvm::StringRef lldb_private::ObjCLanguage::GetNilReferenceSummaryString ( )
inlineoverridevirtual

Returns the summary string for ValueObjects for which IsNilReference() is true.

Reimplemented from lldb_private::Language.

Definition at line 160 of file ObjCLanguage.h.

◆ GetPluginName()

llvm::StringRef lldb_private::ObjCLanguage::GetPluginName ( )
inlineoverridevirtual

Implements lldb_private::PluginInterface.

Definition at line 200 of file ObjCLanguage.h.

References GetPluginNameStatic().

Referenced by GetFormatters().

◆ GetPluginNameStatic()

static llvm::StringRef lldb_private::ObjCLanguage::GetPluginNameStatic ( )
inlinestatic

Definition at line 173 of file ObjCLanguage.h.

Referenced by GetPluginName().

◆ GetPossibleFormattersMatches()

std::vector< FormattersMatchCandidate > ObjCLanguage::GetPossibleFormattersMatches ( ValueObject valobj,
lldb::DynamicValueType  use_dynamic 
)
overridevirtual

◆ GetTypeScavenger()

std::unique_ptr< Language::TypeScavenger > ObjCLanguage::GetTypeScavenger ( )
overridevirtual

◆ GetUserEntryPointName()

llvm::StringRef lldb_private::ObjCLanguage::GetUserEntryPointName ( ) const
inlineoverridevirtual

Reimplemented from lldb_private::Language.

Definition at line 130 of file ObjCLanguage.h.

◆ Initialize()

void ObjCLanguage::Initialize ( )
static

Definition at line 43 of file ObjCLanguage.cpp.

References lldb_private::PluginManager::RegisterPlugin().

◆ IsNilReference()

bool ObjCLanguage::IsNilReference ( ValueObject valobj)
overridevirtual

◆ IsPossibleObjCMethodName()

static bool lldb_private::ObjCLanguage::IsPossibleObjCMethodName ( const char *  name)
inlinestatic

◆ IsPossibleObjCSelector()

static bool lldb_private::ObjCLanguage::IsPossibleObjCSelector ( const char *  name)
inlinestatic

Definition at line 183 of file ObjCLanguage.h.

◆ IsSourceFile()

bool ObjCLanguage::IsSourceFile ( llvm::StringRef  file_path) const
overridevirtual

Implements lldb_private::Language.

Definition at line 1035 of file ObjCLanguage.cpp.

◆ SupportsExceptionBreakpointsOnThrow()

bool lldb_private::ObjCLanguage::SupportsExceptionBreakpointsOnThrow ( ) const
inlineoverridevirtual

Returns true if this Language supports exception breakpoints on throw via a corresponding LanguageRuntime plugin.

Reimplemented from lldb_private::Language.

Definition at line 197 of file ObjCLanguage.h.

◆ SymbolNameFitsToLanguage()

bool ObjCLanguage::SymbolNameFitsToLanguage ( Mangled  name) const
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 225 of file ObjCLanguage.cpp.

References lldb_private::ConstString::GetCString(), lldb_private::Mangled::GetDemangledName(), and IsPossibleObjCMethodName().

◆ Terminate()

void ObjCLanguage::Terminate ( )
static

Member Data Documentation

◆ m_highlighter

ClangHighlighter lldb_private::ObjCLanguage::m_highlighter
private

Definition at line 23 of file ObjCLanguage.h.

Referenced by GetHighlighter().


The documentation for this class was generated from the following files: