LIEF: Library to Instrument Executable Formats Version 0.15.1
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 ,
  CLASS , ARRAY , POINTER , STRUCT ,
  UNION
}
 

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 (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_const_type
  • DW_TAG_pointer_type
  • DW_TAG_structure_type
  • DW_TAG_base_type
  • DW_TAG_class_type
  • DW_TAG_enumeration_type
  • DW_TAG_string_type
  • DW_TAG_union_type
  • DW_TAG_volatile_type
  • DW_TAG_unspecified_type

Member Enumeration Documentation

◆ KIND

enum class LIEF::dwarf::Type::KIND
strong
Enumerator
UNKNOWN 
UNSPECIFIED 
BASE 
CONST 
CLASS 
ARRAY 
POINTER 
STRUCT 
UNION 

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