10#ifndef LLDB_TARGET_LANGUAGE_H
11#define LLDB_TARGET_LANGUAGE_H
47 bool print_help_if_available) = 0;
52 typedef std::set<std::unique_ptr<Result>>
ResultSet;
103 template <
typename... ScavengerTypes>
107 for (std::shared_ptr<TypeScavenger> scavenger : { std::shared_ptr<TypeScavenger>(
new ScavengerTypes())... }) {
115 const bool append =
false;
117 if (scavenger && scavenger->Find(exe_scope, key, results, append))
126 template <
typename... ScavengerTypes>
130 for (std::shared_ptr<TypeScavenger> scavenger : { std::shared_ptr<TypeScavenger>(
new ScavengerTypes())... }) {
138 const bool append =
true;
139 bool success =
false;
142 success = scavenger->Find(exe_scope, key, results, append) || success;
165 llvm::StringRef file_path);
191 virtual std::vector<FormattersMatchCandidate>
212 virtual std::vector<Language::MethodNameVariant>
214 return std::vector<Language::MethodNameVariant>();
237 virtual std::pair<llvm::StringRef, llvm::StringRef>
292 bool throw_on,
Stream &s);
313 llvm::StringRef prefix,
314 llvm::StringRef suffix);
344 virtual std::vector<ConstString>
346 return std::vector<ConstString>();
static llvm::raw_ostream & error(Stream &strm)
Generic representation of a type in a programming language.
void DumpTypeDescription(lldb::DescriptionLevel level=lldb::eDescriptionLevelFull) const
Dump to stdout.
A uniqued constant string class.
std::function< bool(ConstString, ConstString, const DumpValueObjectOptions &, Stream &)> DeclPrintingHelper
"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.
A class that describes a function.
Annotates source code with color attributes.
static llvm::StringRef GetSettingName()
bool GetEnableFilterForLineBreakpoints() const
bool Find_Impl(ExecutionContextScope *exe_scope, const char *key, ResultSet &results) override
std::vector< std::shared_ptr< TypeScavenger > > m_scavengers
~Result() override=default
CompilerType m_compiler_type
bool DumpToStream(Stream &stream, bool print_help_if_available) override
Result(CompilerType type)
virtual CompilerType AdjustForInclusion(CompilerType &candidate)=0
bool Find_Impl(ExecutionContextScope *exe_scope, const char *key, ResultSet &results) override
~ImageListTypeScavenger() override=default
ImageListTypeScavenger()=default
ConstString GetName() const
lldb::FunctionNameType m_type
MethodNameVariant(ConstString name, lldb::FunctionNameType type)
lldb::FunctionNameType GetType() const
virtual ~Result()=default
virtual bool DumpToStream(Stream &stream, bool print_help_if_available)=0
std::set< std::unique_ptr< Result > > ResultSet
virtual ~TypeScavenger()=default
virtual bool Find_Impl(ExecutionContextScope *exe_scope, const char *key, ResultSet &results)=0
size_t Find(ExecutionContextScope *exe_scope, const char *key, ResultSet &results, bool append=true)
std::vector< std::shared_ptr< TypeScavenger > > m_scavengers
bool Find_Impl(ExecutionContextScope *exe_scope, const char *key, ResultSet &results) override
virtual bool IsSourceFile(llvm::StringRef file_path) const =0
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...
static LanguageSet GetLanguagesSupportingREPLs()
static LanguageSet GetLanguagesSupportingTypeSystems()
virtual ConstString GetDisplayDemangledName(Mangled mangled) const
virtual std::vector< FormattersMatchCandidate > GetPossibleFormattersMatches(ValueObject &valobj, lldb::DynamicValueType use_dynamic)
virtual bool SupportsExceptionBreakpointsOnCatch() const
Returns true if this Language supports exception breakpoints on catch via a corresponding LanguageRun...
FunctionNameRepresentation
virtual lldb::TypeCategoryImplSP GetFormatters()
virtual bool IgnoreForLineBreakpoints(const SymbolContext &) const
Returns true if this SymbolContext should be ignored when setting breakpoints by line (number or rege...
virtual llvm::StringRef GetInstanceVariableName()
static Language * FindPlugin(lldb::LanguageType language)
static const char * GetNameForLanguageType(lldb::LanguageType language)
virtual DumpValueObjectOptions::DeclPrintingHelper GetDeclPrintingHelper()
static LanguageProperties & GetGlobalLanguageProperties()
virtual LazyBool IsLogicalTrue(ValueObject &valobj, Status &error)
virtual ConstString GetDemangledFunctionNameWithoutArguments(Mangled mangled) const
virtual const char * GetLanguageSpecificTypeLookupHelp()
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 llvm::StringRef GetCatchKeyword() const
Returns the keyword used for catch statements in this language, e.g.
virtual llvm::StringRef GetThrowKeyword() const
Returns the keyword used for throw statements in this language, e.g.
static bool LanguageIsC(lldb::LanguageType language)
virtual lldb::LanguageType GetLanguageType() const =0
virtual HardcodedFormatters::HardcodedSummaryFinder GetHardcodedSummaries()
virtual std::vector< Language::MethodNameVariant > GetMethodNameVariants(ConstString method_name) const
static void GetDefaultExceptionResolverDescription(bool catch_on, bool throw_on, Stream &s)
virtual bool SupportsExceptionBreakpointsOnThrow() const
Returns true if this Language supports exception breakpoints on throw via a corresponding LanguageRun...
virtual bool DemangledNameContainsPath(llvm::StringRef path, ConstString demangled) const
virtual std::vector< ConstString > GenerateAlternateFunctionManglings(const ConstString mangled) const
static bool LanguageIsCPlusPlus(lldb::LanguageType language)
static lldb::LanguageType GetPrimaryLanguage(lldb::LanguageType language)
const Language & operator=(const Language &)=delete
virtual ConstString FindBestAlternateFunctionMangledName(const Mangled mangled, const SymbolContext &sym_ctx) const
static bool LanguageIsPascal(lldb::LanguageType language)
virtual bool IsNilReference(ValueObject &valobj)
static void ForAllLanguages(std::function< bool(lldb::LanguageType)> callback)
virtual bool IsUninitializedReference(ValueObject &valobj)
virtual bool GetFunctionDisplayName(const SymbolContext *sc, const ExecutionContext *exe_ctx, FunctionNameRepresentation representation, Stream &s)
virtual llvm::StringRef GetNilReferenceSummaryString()
Returns the summary string for ValueObjects for which IsNilReference() is true.
static void PrintAllLanguages(Stream &s, const char *prefix, const char *suffix)
virtual HardcodedFormatters::HardcodedSyntheticFinder GetHardcodedSynthetics()
virtual const Highlighter * GetHighlighter() const
virtual std::unique_ptr< TypeScavenger > GetTypeScavenger()
static LanguageSet GetLanguagesSupportingTypeSystemsForExpressions()
virtual llvm::StringRef GetUserEntryPointName() const
virtual bool IsTopLevelFunction(Function &function)
virtual void GetExceptionResolverDescription(bool catch_on, bool throw_on, Stream &s)
static lldb::LanguageType GetLanguageTypeFromString(const char *string)=delete
static void ForEach(std::function< bool(Language *)> callback)
Language(const Language &)=delete
static bool LanguageIsCFamily(lldb::LanguageType language)
Equivalent to LanguageIsC||LanguageIsObjC||LanguageIsCPlusPlus.
static std::set< lldb::LanguageType > GetSupportedLanguages()
virtual HardcodedFormatters::HardcodedFormatFinder GetHardcodedFormats()
static bool LanguageIsObjC(lldb::LanguageType language)
virtual bool SymbolNameFitsToLanguage(Mangled name) const
Returns true iff the given symbol name is compatible with the mangling scheme of this language.
A class that handles mangled names.
ConstString GetDemangledName() const
Demangled name get accessor.
ConstString & GetMangledName()
Mangled name get accessor.
A stream class that can stream formatted output to a file.
size_t EOL()
Output and End of Line character to the stream.
Defines a symbol context baton that can be handed other debug core functions.
A class that represents a running process on the host machine.
LanguageType
Programming language type.
std::shared_ptr< lldb_private::TypeCategoryImpl > TypeCategoryImplSP
A SmallBitVector that represents a set of source languages (lldb::LanguageType).