LLDB  mainline
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lldb_private::Type Class Reference

#include <Type.h>

Inheritance diagram for lldb_private::Type:
Inheritance graph
[legend]
Collaboration diagram for lldb_private::Type:
Collaboration graph
[legend]

Classes

struct  Flags
 

Public Types

enum  EncodingDataTypeTag {
  eEncodingInvalid, eEncodingIsUID, eEncodingIsConstUID, eEncodingIsRestrictUID,
  eEncodingIsVolatileUID, eEncodingIsTypedefUID, eEncodingIsPointerUID, eEncodingIsLValueReferenceUID,
  eEncodingIsRValueReferenceUID, eEncodingIsSyntheticUID
}
 
enum  ResolveStateTag : unsigned { eResolveStateUnresolved = 0, eResolveStateForward = 1, eResolveStateLayout = 2, eResolveStateFull = 3 }
 
typedef enum lldb_private::Type::EncodingDataTypeTag EncodingDataType
 
typedef enum lldb_private::Type::ResolveStateTag ResolveState
 

Public Member Functions

 Type (lldb::user_id_t uid, SymbolFile *symbol_file, ConstString name, llvm::Optional< uint64_t > byte_size, SymbolContextScope *context, lldb::user_id_t encoding_uid, EncodingDataType encoding_uid_type, const Declaration &decl, const CompilerType &compiler_qual_type, ResolveState compiler_type_resolve_state)
 
 Type ()
 
 Type (const Type &rhs)
 
const Typeoperator= (const Type &rhs)
 
void Dump (Stream *s, bool show_context)
 
void DumpTypeName (Stream *s)
 
lldb::ModuleSP GetModule ()
 
void GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_name)
 
SymbolFileGetSymbolFile ()
 
const SymbolFileGetSymbolFile () const
 
TypeListGetTypeList ()
 
ConstString GetName ()
 
llvm::Optional< uint64_t > GetByteSize ()
 
uint32_t GetNumChildren (bool omit_empty_base_classes)
 
bool IsAggregateType ()
 
bool IsValidType ()
 
bool IsTypedef ()
 
lldb::TypeSP GetTypedefType ()
 
ConstString GetName () const
 
ConstString GetQualifiedName ()
 
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)
 
bool DumpValueInMemory (ExecutionContext *exe_ctx, Stream *s, lldb::addr_t address, AddressType address_type, bool show_types, bool show_summary, bool verbose)
 
bool ReadFromMemory (ExecutionContext *exe_ctx, lldb::addr_t address, AddressType address_type, DataExtractor &data)
 
bool WriteToMemory (ExecutionContext *exe_ctx, lldb::addr_t address, AddressType address_type, DataExtractor &data)
 
bool GetIsDeclaration () const
 
void SetIsDeclaration (bool b)
 
bool GetIsExternal () const
 
void SetIsExternal (bool b)
 
lldb::Format GetFormat ()
 
lldb::Encoding GetEncoding (uint64_t &count)
 
SymbolContextScopeGetSymbolContextScope ()
 
const SymbolContextScopeGetSymbolContextScope () const
 
void SetSymbolContextScope (SymbolContextScope *context)
 
const lldb_private::DeclarationGetDeclaration () const
 
CompilerType GetFullCompilerType ()
 
CompilerType GetLayoutCompilerType ()
 
CompilerType GetForwardCompilerType ()
 
void SetEncodingType (Type *encoding_type)
 
uint32_t GetEncodingMask ()
 
bool IsCompleteObjCClass ()
 
void SetIsCompleteObjCClass (bool is_complete_objc_class)
 
- Public Member Functions inherited from lldb_private::UserID
 UserID (lldb::user_id_t uid=LLDB_INVALID_UID)
 Construct with optional user ID. More...
 
 ~UserID ()
 Destructor. More...
 
void Clear ()
 Clears the object state. More...
 
lldb::user_id_t GetID () const
 Get accessor for the user ID. More...
 
void SetID (lldb::user_id_t uid)
 Set accessor for the user ID. More...
 

Static Public Member Functions

static int Compare (const Type &a, const Type &b)
 
static bool GetTypeScopeAndBasename (const llvm::StringRef &name, llvm::StringRef &scope, llvm::StringRef &basename, lldb::TypeClass &type_class)
 

Protected Member Functions

TypeGetEncodingType ()
 
bool ResolveClangType (ResolveState compiler_type_resolve_state)
 

Protected Attributes

ConstString m_name
 
SymbolFilem_symbol_file
 
SymbolContextScopem_context
 
Typem_encoding_type
 
lldb::user_id_t m_encoding_uid
 
EncodingDataType m_encoding_uid_type
 
uint64_t m_byte_size: 63
 
uint64_t m_byte_size_has_value: 1
 
Declaration m_decl
 
CompilerType m_compiler_type
 
struct lldb_private::Type::Flags m_flags
 
- Protected Attributes inherited from lldb_private::UserID
lldb::user_id_t m_uid
 The user ID that uniquely identifies an object. More...
 

Detailed Description

Definition at line 60 of file Type.h.

Member Typedef Documentation

◆ EncodingDataType

◆ ResolveState

Member Enumeration Documentation

◆ EncodingDataTypeTag

Enumerator
eEncodingInvalid 
eEncodingIsUID 

This type is the type whose UID is m_encoding_uid.

eEncodingIsConstUID 

This type is the type whose UID is m_encoding_uid with the const qualifier added.

eEncodingIsRestrictUID 

This type is the type whose UID is m_encoding_uid with the restrict qualifier added.

eEncodingIsVolatileUID 

This type is the type whose UID is m_encoding_uid with the volatile qualifier added.

eEncodingIsTypedefUID 

This type is pointer 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.

eEncodingIsSyntheticUID 

Definition at line 62 of file Type.h.

◆ ResolveStateTag

Enumerator
eResolveStateUnresolved 
eResolveStateForward 
eResolveStateLayout 
eResolveStateFull 

Definition at line 88 of file Type.h.

Constructor & Destructor Documentation

◆ Type() [1/3]

Type::Type ( lldb::user_id_t  uid,
SymbolFile symbol_file,
ConstString  name,
llvm::Optional< uint64_t >  byte_size,
SymbolContextScope context,
lldb::user_id_t  encoding_uid,
EncodingDataType  encoding_uid_type,
const Declaration decl,
const CompilerType compiler_qual_type,
ResolveState  compiler_type_resolve_state 
)

◆ Type() [2/3]

Type::Type ( )

◆ Type() [3/3]

Type::Type ( const Type rhs)

Definition at line 141 of file Type.cpp.

Member Function Documentation

◆ Compare()

int Type::Compare ( const Type a,
const Type b 
)
static

Definition at line 615 of file Type.cpp.

References lldb_private::UserID::GetID().

◆ Dump()

void Type::Dump ( Stream s,
bool  show_context 
)

◆ DumpTypeName()

void Type::DumpTypeName ( Stream s)

Definition at line 281 of file Type.cpp.

References lldb_private::ConstString::Dump(), and GetName().

Referenced by lldb_private::Variable::Dump(), and DumpValue().

◆ DumpValue()

void Type::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 
)

◆ DumpValueInMemory()

bool Type::DumpValueInMemory ( ExecutionContext exe_ctx,
Stream s,
lldb::addr_t  address,
AddressType  address_type,
bool  show_types,
bool  show_summary,
bool  verbose 
)

◆ GetByteSize()

llvm::Optional< uint64_t > Type::GetByteSize ( )

◆ GetDeclaration()

const Declaration & Type::GetDeclaration ( ) const

Definition at line 439 of file Type.cpp.

References m_decl.

Referenced by lldb_private::Block::AddRange(), and lldb_private::Function::GetStartLineSourceInfo().

◆ GetDescription()

void Type::GetDescription ( Stream s,
lldb::DescriptionLevel  level,
bool  show_name 
)

◆ GetEncoding()

lldb::Encoding Type::GetEncoding ( uint64_t &  count)

◆ GetEncodingMask()

uint32_t Type::GetEncodingMask ( )

◆ GetEncodingType()

Type * Type::GetEncodingType ( )
protected

◆ GetFormat()

lldb::Format Type::GetFormat ( )

Definition at line 371 of file Type.cpp.

References lldb_private::CompilerType::GetFormat(), and GetForwardCompilerType().

Referenced by DumpValue().

◆ GetForwardCompilerType()

CompilerType Type::GetForwardCompilerType ( )

◆ GetFullCompilerType()

CompilerType Type::GetFullCompilerType ( )

◆ GetIsDeclaration()

bool lldb_private::Type::GetIsDeclaration ( ) const

◆ GetIsExternal()

bool lldb_private::Type::GetIsExternal ( ) const

◆ GetLayoutCompilerType()

CompilerType Type::GetLayoutCompilerType ( )

◆ GetModule()

ModuleSP Type::GetModule ( )

◆ GetName() [1/2]

ConstString Type::GetName ( )

◆ GetName() [2/2]

ConstString lldb_private::Type::GetName ( ) const
inline

Definition at line 140 of file Type.h.

References DumpValue(), and lldb::eFormatDefault.

◆ GetNumChildren()

uint32_t Type::GetNumChildren ( bool  omit_empty_base_classes)

◆ GetQualifiedName()

ConstString Type::GetQualifiedName ( )

◆ GetSymbolContextScope() [1/2]

SymbolContextScope* lldb_private::Type::GetSymbolContextScope ( )
inline

Definition at line 171 of file Type.h.

◆ GetSymbolContextScope() [2/2]

const SymbolContextScope* lldb_private::Type::GetSymbolContextScope ( ) const
inline

Definition at line 172 of file Type.h.

◆ GetSymbolFile() [1/2]

SymbolFile* lldb_private::Type::GetSymbolFile ( )
inline

◆ GetSymbolFile() [2/2]

const SymbolFile* lldb_private::Type::GetSymbolFile ( ) const
inline

Definition at line 122 of file Type.h.

◆ GetTypedefType()

lldb::TypeSP Type::GetTypedefType ( )

◆ GetTypeList()

TypeList * Type::GetTypeList ( )

Definition at line 437 of file Type.cpp.

References GetSymbolFile(), and lldb_private::SymbolFile::GetTypeList().

◆ GetTypeScopeAndBasename()

bool Type::GetTypeScopeAndBasename ( const llvm::StringRef &  name,
llvm::StringRef &  scope,
llvm::StringRef &  basename,
lldb::TypeClass &  type_class 
)
static

◆ IsAggregateType()

bool Type::IsAggregateType ( )

◆ IsCompleteObjCClass()

bool lldb_private::Type::IsCompleteObjCClass ( )
inline

Definition at line 204 of file Type.h.

◆ IsTypedef()

bool lldb_private::Type::IsTypedef ( )
inline

Definition at line 136 of file Type.h.

Referenced by GetTypedefType().

◆ IsValidType()

bool lldb_private::Type::IsValidType ( )
inline

Definition at line 134 of file Type.h.

References lldb::eEncodingInvalid.

◆ operator=()

const Type& lldb_private::Type::operator= ( const Type rhs)

◆ ReadFromMemory()

bool Type::ReadFromMemory ( ExecutionContext exe_ctx,
lldb::addr_t  address,
AddressType  address_type,
DataExtractor data 
)

◆ ResolveClangType()

bool Type::ResolveClangType ( ResolveState  compiler_type_resolve_state)
protected

◆ SetEncodingType()

void lldb_private::Type::SetEncodingType ( Type encoding_type)
inline

Definition at line 200 of file Type.h.

◆ SetIsCompleteObjCClass()

void lldb_private::Type::SetIsCompleteObjCClass ( bool  is_complete_objc_class)
inline

Definition at line 206 of file Type.h.

◆ SetIsDeclaration()

void lldb_private::Type::SetIsDeclaration ( bool  b)

◆ SetIsExternal()

void lldb_private::Type::SetIsExternal ( bool  b)

◆ SetSymbolContextScope()

void lldb_private::Type::SetSymbolContextScope ( SymbolContextScope context)
inline

Definition at line 173 of file Type.h.

References basename(), Compare(), and lldb_private::CompilerContext::name.

◆ WriteToMemory()

bool Type::WriteToMemory ( ExecutionContext exe_ctx,
lldb::addr_t  address,
AddressType  address_type,
DataExtractor data 
)

Definition at line 432 of file Type.cpp.

Member Data Documentation

◆ m_byte_size

uint64_t lldb_private::Type::m_byte_size
protected

Definition at line 218 of file Type.h.

Referenced by Dump(), GetByteSize(), GetDescription(), and Type().

◆ m_byte_size_has_value

uint64_t lldb_private::Type::m_byte_size_has_value
protected

Definition at line 219 of file Type.h.

Referenced by Dump(), GetByteSize(), and Type().

◆ m_compiler_type

CompilerType lldb_private::Type::m_compiler_type
protected

◆ m_context

SymbolContextScope* lldb_private::Type::m_context
protected

Definition at line 214 of file Type.h.

Referenced by Dump().

◆ m_decl

Declaration lldb_private::Type::m_decl
protected

Definition at line 220 of file Type.h.

Referenced by Dump(), GetDeclaration(), and GetDescription().

◆ m_encoding_type

Type* lldb_private::Type::m_encoding_type
protected

Definition at line 215 of file Type.h.

Referenced by GetEncodingType().

◆ m_encoding_uid

lldb::user_id_t lldb_private::Type::m_encoding_uid
protected

Definition at line 216 of file Type.h.

Referenced by Dump(), GetDescription(), GetEncodingType(), GetTypedefType(), and ResolveClangType().

◆ m_encoding_uid_type

EncodingDataType lldb_private::Type::m_encoding_uid_type
protected

Definition at line 217 of file Type.h.

Referenced by Dump(), GetByteSize(), GetDescription(), GetEncodingMask(), and ResolveClangType().

◆ m_flags

struct lldb_private::Type::Flags lldb_private::Type::m_flags
protected

Referenced by ResolveClangType(), and Type().

◆ m_name

ConstString lldb_private::Type::m_name
protected

Definition at line 211 of file Type.h.

Referenced by Dump(), GetName(), and ResolveClangType().

◆ m_symbol_file

SymbolFile* lldb_private::Type::m_symbol_file
protected

Definition at line 212 of file Type.h.

Referenced by GetByteSize(), GetEncodingType(), GetModule(), GetTypedefType(), and ResolveClangType().


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