LIEF: Library to Instrument Executable Formats Version 0.16.0
Loading...
Searching...
No Matches
LIEF::dwarf::Type Class Reference

This class represents a DWARF Type which includes: More...

#include <Type.hpp>

Inheritance diagram for LIEF::dwarf::Type:

Classes

class  Iterator
 

Public Types

enum class  KIND {
  UNKNOWN = 0 , UNSPECIFIED , BASE , CONST_KIND ,
  CLASS , ARRAY , POINTER , STRUCT ,
  UNION , TYPEDEF , REF , SET_TYPE ,
  STRING , SUBROUTINE , POINTER_MEMBER , PACKED ,
  FILE , THROWN , VOLATILE , RESTRICT ,
  INTERFACE , SHARED , RVALREF , TEMPLATE_ALIAS ,
  COARRAY , DYNAMIC , ATOMIC , IMMUTABLE ,
  ENUM
}
 

Public Member Functions

virtual ~Type ()
 
KIND kind () const
 
bool is_unspecified () const
 Whether this type is a DW_TAG_unspecified_type
 
result< std::string > name () const
 Return the type's name using either DW_AT_name or DW_AT_picture_string (if any).
 
result< uint64_t > size () const
 Return the size of the type or an error if it can't be computed.
 
debug_location_t location () const
 Return the debug location where this type is defined.
 
std::unique_ptr< Scopescope () const
 Return the scope in which this type is defined.
 
template<class T >
const T * as () const
 

Static Public Member Functions

static std::unique_ptr< Typecreate (std::unique_ptr< details::Type > impl)
 

Detailed Description

This class represents a DWARF Type which includes:

  • DW_TAG_array_type
  • DW_TAG_atomic_type
  • DW_TAG_base_type
  • DW_TAG_class_type
  • DW_TAG_coarray_type
  • DW_TAG_const_type
  • DW_TAG_dynamic_type
  • DW_TAG_enumeration_type
  • DW_TAG_file_type
  • DW_TAG_immutable_type
  • DW_TAG_interface_type
  • DW_TAG_packed_type
  • DW_TAG_pointer_type
  • DW_TAG_ptr_to_member_type
  • DW_TAG_reference_type
  • DW_TAG_restrict_type
  • DW_TAG_rvalue_reference_type
  • DW_TAG_set_type
  • DW_TAG_shared_type
  • DW_TAG_string_type
  • DW_TAG_structure_type
  • DW_TAG_subroutine_type
  • DW_TAG_template_alias
  • DW_TAG_thrown_type
  • DW_TAG_typedef
  • DW_TAG_union_type
  • DW_TAG_unspecified_type
  • DW_TAG_volatile_type

Member Enumeration Documentation

◆ KIND

enum class LIEF::dwarf::Type::KIND
strong
Enumerator
UNKNOWN 
UNSPECIFIED 
BASE 
CONST_KIND 
CLASS 
ARRAY 
POINTER 
STRUCT 
UNION 
TYPEDEF 
REF 
SET_TYPE 
STRING 
SUBROUTINE 
POINTER_MEMBER 
PACKED 
FILE 
THROWN 
VOLATILE 
RESTRICT 
INTERFACE 
SHARED 
RVALREF 
TEMPLATE_ALIAS 
COARRAY 
DYNAMIC 
ATOMIC 
IMMUTABLE 
ENUM 

Constructor & Destructor Documentation

◆ ~Type()

virtual LIEF::dwarf::Type::~Type ( )
virtual

Member Function Documentation

◆ as()

template<class T >
const T * LIEF::dwarf::Type::as ( ) const
inline

◆ create()

static std::unique_ptr< Type > LIEF::dwarf::Type::create ( std::unique_ptr< details::Type > impl)
static

◆ is_unspecified()

bool LIEF::dwarf::Type::is_unspecified ( ) const
inline

Whether this type is a DW_TAG_unspecified_type

◆ kind()

◆ location()

debug_location_t LIEF::dwarf::Type::location ( ) const

Return the debug location where this type is defined.

◆ name()

result< std::string > LIEF::dwarf::Type::name ( ) const

Return the type's name using either DW_AT_name or DW_AT_picture_string (if any).

◆ scope()

std::unique_ptr< Scope > LIEF::dwarf::Type::scope ( ) const

Return the scope in which this type is defined.

◆ size()

result< uint64_t > LIEF::dwarf::Type::size ( ) const

Return the size of the type or an error if it can't be computed.

This size should match the equivalent of sizeof(Type).


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