9#ifndef LLDB_SYMBOL_TYPE_H
10#define LLDB_SYMBOL_TYPE_H
19#include "llvm/ADT/APSInt.h"
25class SymbolFileCommon;
46 llvm::ArrayRef<CompilerContext> pattern);
68class Type :
public std::enable_shared_from_this<Type>,
public UserID {
153 bool show_type,
bool show_summary,
bool verbose,
158 bool show_types,
bool show_summary,
bool verbose);
196 llvm::StringRef &scope,
197 llvm::StringRef &basename,
198 lldb::TypeClass &type_class);
263 TypeImpl(
const lldb::TypeSP &type_sp);
271 void SetType(
const lldb::TypeSP &type_sp);
285 explicit operator bool()
const;
320 lldb::ModuleSP &module_sp)
const;
347 lldb::TypeImplSP type_sp;
365 bool is_bitfield =
false)
428 void SetName(
const char *type_name_cstr);
444 explicit operator bool() {
return !
IsEmpty(); }
456 const std::string &name,
493 const llvm::APSInt &value);
520 void Append(
const lldb::TypeEnumMemberImplSP &type) {
527 lldb::TypeEnumMemberImplSP enum_member;
Represents a generic declaration such as a function declaration.
This is a minimal wrapper of a TypeSystem shared pointer as returned by CompilerType which conventien...
Generic representation of a type in a programming language.
A uniqued constant string class.
A class that describes the declaration location of a lldb object.
"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 stream class that can stream formatted output to a file.
"lldb/Symbol/SymbolContextScope.h" Inherit from this if your object is part of a symbol context and c...
Containing protected virtual methods for child classes to override.
SymbolFile & m_symbol_file
SymbolFileType(SymbolFile &symbol_file, lldb::user_id_t uid)
SymbolFile & GetSymbolFile() const
~SymbolFileType()=default
Provides public interface for all SymbolFiles.
Sometimes you can find the name of the type corresponding to an object, but we don't have debug infor...
void SetName(ConstString type_name)
TypeAndOrName(const CompilerType &compiler_type)
bool operator!=(const TypeAndOrName &other) const
bool operator==(const TypeAndOrName &other) const
CompilerType GetCompilerType() const
ConstString GetName() const
bool HasCompilerType() const
void SetCompilerType(CompilerType compiler_type)
void SetTypeSP(lldb::TypeSP type_sp)
CompilerType m_compiler_type
TypeAndOrName(lldb::TypeSP &type_sp)
int64_t GetValueAsSigned() const
ConstString GetName() const
const lldb::TypeImplSP & GetIntegerType() const
TypeEnumMemberImpl(const TypeEnumMemberImpl &rhs)=default
TypeEnumMemberImpl & operator=(const TypeEnumMemberImpl &rhs)
lldb::TypeImplSP m_integer_type_sp
uint64_t GetValueAsUnsigned() const
TypeEnumMemberListImpl()=default
lldb::TypeEnumMemberImplSP GetTypeEnumMemberAtIndex(size_t idx)
std::vector< lldb::TypeEnumMemberImplSP > m_content
void Append(const lldb_private::TypeEnumMemberListImpl &type_list)
void Append(const lldb::TypeEnumMemberImplSP &type)
CompilerType GetCompilerType(bool prefer_dynamic)
bool operator!=(const TypeImpl &rhs) const
bool CheckExeModule(lldb::ModuleSP &module_sp) const
bool GetDescription(lldb_private::Stream &strm, lldb::DescriptionLevel description_level)
bool operator==(const TypeImpl &rhs) const
bool CheckModuleCommon(const lldb::ModuleWP &input_module_wp, lldb::ModuleSP &module_sp) const
TypeImpl GetCanonicalType() const
void SetType(const lldb::TypeSP &type_sp)
TypeImpl GetUnqualifiedType() const
TypeImpl GetPointeeType() const
CompilerType m_dynamic_type
CompilerType::TypeSystemSPWrapper GetTypeSystem(bool prefer_dynamic)
CompilerType m_static_type
bool CheckModule(lldb::ModuleSP &module_sp) const
lldb::ModuleSP GetModule() const
TypeImpl GetDereferencedType() const
TypeImpl GetPointerType() const
lldb::ModuleWP m_exe_module_wp
TypeImpl GetReferenceType() const
TypeImpl GetTypedefedType() const
lldb::ModuleWP m_module_wp
ConstString GetName() const
ConstString GetDisplayTypeName() const
void operator()(const lldb::TypeImplSP &type)
TypeListImpl & m_type_list
AppendVisitor(TypeListImpl &type_list)
lldb::TypeImplSP GetTypeAtIndex(size_t idx)
void Append(const lldb::TypeImplSP &type)
std::vector< lldb::TypeImplSP > m_content
TypeMemberFunctionImpl()=default
size_t GetNumArguments() const
CompilerType GetReturnType() const
ConstString GetMangledName() const
CompilerType GetType() const
ConstString GetName() const
TypeMemberFunctionImpl(const CompilerType &type, const CompilerDecl &decl, const std::string &name, const lldb::MemberFunctionKind &kind)
CompilerType GetArgumentAtIndex(size_t idx) const
bool GetDescription(Stream &stream)
lldb::MemberFunctionKind GetKind() const
std::string GetPrintableTypeName()
lldb::MemberFunctionKind m_kind
bool GetIsBitfield() const
uint32_t GetBitfieldBitSize() const
void SetIsBitfield(bool is_bitfield)
const lldb::TypeImplSP & GetTypeImpl()
ConstString GetName() const
TypeMemberImpl(const lldb::TypeImplSP &type_impl_sp, uint64_t bit_offset, ConstString name, uint32_t bitfield_bit_size=0, bool is_bitfield=false)
uint32_t m_bitfield_bit_size
uint64_t GetBitOffset() const
TypeMemberImpl(const lldb::TypeImplSP &type_impl_sp, uint64_t bit_offset)
lldb::TypeImplSP m_type_impl_sp
void SetBitfieldBitSize(uint32_t bitfield_bit_size)
void SetEncodingType(Type *encoding_type)
CompilerType m_compiler_type
CompilerType GetForwardCompilerType()
Type & operator=(const Type &t)=default
const SymbolContextScope * GetSymbolContextScope() const
void SetSymbolContextScope(SymbolContextScope *context)
static bool GetTypeScopeAndBasename(llvm::StringRef name, llvm::StringRef &scope, llvm::StringRef &basename, lldb::TypeClass &type_class)
const lldb_private::Declaration & GetDeclaration() const
uint64_t m_byte_size_has_value
void DumpValue(ExecutionContext *exe_ctx, Stream *s, const DataExtractor &data, uint32_t data_offset, bool show_type, bool show_summary, bool verbose, lldb::Format format=lldb::eFormatDefault)
ResolveState m_compiler_type_resolve_state
static int Compare(const Type &a, const Type &b)
uint32_t GetEncodingMask()
void GetDescription(Stream *s, lldb::DescriptionLevel level, bool show_name, ExecutionContextScope *exe_scope)
Type & operator=(Type &&t)=default
uint32_t GetNumChildren(bool omit_empty_base_classes)
const SymbolFile * GetSymbolFile() const
SymbolContextScope * m_context
The symbol context in which this type is defined.
lldb::user_id_t m_encoding_uid
@ eEncodingIsRestrictUID
This type is the type whose UID is m_encoding_uid with the restrict qualifier added.
@ eEncodingIsConstUID
This type is the type whose UID is m_encoding_uid with the const qualifier added.
@ eEncodingIsVolatileUID
This type is the type whose UID is m_encoding_uid with the volatile qualifier added.
@ eEncodingIsAtomicUID
This type is the type whose UID is m_encoding_uid as an atomic type.
@ eEncodingIsSyntheticUID
This type is the synthetic type whose UID is m_encoding_uid.
@ eEncodingInvalid
Invalid encoding.
@ eEncodingIsTypedefUID
This type is alias to a type whose UID is m_encoding_uid.
@ eEncodingIsPointerUID
This type is pointer to a type whose UID is m_encoding_uid.
@ eEncodingIsLValueReferenceUID
This type is L value reference to a type whose UID is m_encoding_uid.
@ eEncodingIsRValueReferenceUID
This type is R value reference to a type whose UID is m_encoding_uid.
@ eEncodingIsUID
This type is the type whose UID is m_encoding_uid.
Payload m_payload
Language-specific flags.
SymbolFile * GetSymbolFile()
void Dump(Stream *s, bool show_context, lldb::DescriptionLevel level=lldb::eDescriptionLevelFull)
Payload GetPayload()
Return the language-specific payload.
CompilerType GetLayoutCompilerType()
void SetPayload(Payload opaque_payload)
Return the language-specific payload.
lldb::Encoding GetEncoding(uint64_t &count)
lldb::ModuleSP GetExeModule()
GetModule may return module for compile unit's object file.
void DumpTypeName(Stream *s)
SymbolContextScope * GetSymbolContextScope()
lldb::TypeSP GetTypedefType()
bool ResolveCompilerType(ResolveState compiler_type_resolve_state)
SymbolFile * m_symbol_file
ConstString GetName() const
EncodingDataType m_encoding_uid_type
std::optional< uint64_t > GetByteSize(ExecutionContextScope *exe_scope)
bool ReadFromMemory(ExecutionContext *exe_ctx, lldb::addr_t address, AddressType address_type, DataExtractor &data)
bool DumpValueInMemory(ExecutionContext *exe_ctx, Stream *s, lldb::addr_t address, AddressType address_type, bool show_types, bool show_summary, bool verbose)
ConstString GetBaseName()
ConstString GetQualifiedName()
CompilerType GetFullCompilerType()
lldb::ModuleSP GetModule()
Since Type instances only keep a "SymbolFile *" internally, other classes like TypeImpl need make sur...
bool WriteToMemory(ExecutionContext *exe_ctx, lldb::addr_t address, AddressType address_type, DataExtractor &data)
A class that represents a running process on the host machine.
bool contextMatches(llvm::ArrayRef< CompilerContext > context_chain, llvm::ArrayRef< CompilerContext > pattern)
Match context_chain against pattern, which may contain "Any" kinds.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Format
Display format definitions.
Encoding
Register encoding definitions.
MemberFunctionKind
Kind of member function.
@ eMemberFunctionKindUnknown
Not sure what the type of this is.
CompilerContext allows an array of these items to be passed to perform detailed lookups in SymbolVend...
bool operator==(const CompilerContext &rhs) const
bool operator!=(const CompilerContext &rhs) const
CompilerContext(CompilerContextKind t, ConstString n)
A mix in class that contains a generic user ID.