15#ifndef LIEF_DWARF_COMPILATION_UNIT_H
16#define LIEF_DWARF_COMPILATION_UNIT_H
32class CompilationUnitIt;
44 using reference = std::unique_ptr<CompilationUnit>&;
56 template <
typename RefT>
62 Iterator(std::unique_ptr<details::CompilationUnitIt> impl);
88 return static_cast<const Iterator*
>(
this)->
operator*();
92 std::unique_ptr<details::CompilationUnitIt> impl_;
123 uint32_t version = 0;
127 lang(lang), version(version)
251 std::unique_ptr<details::CompilationUnit> impl_;
Definition DWARF/CompilationUnit.hpp:47
pointer operator->() const
Definition DWARF/CompilationUnit.hpp:51
Definition DWARF/CompilationUnit.hpp:38
std::unique_ptr< CompilationUnit > value_type
Definition DWARF/CompilationUnit.hpp:41
Iterator(const Iterator &)
Iterator(Iterator &&) noexcept
Iterator operator--(int)
Definition DWARF/CompilationUnit.hpp:73
std::unique_ptr< CompilationUnit > operator*() const
Iterator operator++(int)
Definition DWARF/CompilationUnit.hpp:79
std::unique_ptr< CompilationUnit > & reference
Definition DWARF/CompilationUnit.hpp:44
std::bidirectional_iterator_tag iterator_category
Definition DWARF/CompilationUnit.hpp:40
std::ptrdiff_t difference_type
Definition DWARF/CompilationUnit.hpp:42
details::CompilationUnitIt implementation
Definition DWARF/CompilationUnit.hpp:45
PointerProxy operator->() const
Definition DWARF/CompilationUnit.hpp:87
Languages supported by the DWARF (v5) format. See: https://dwarfstd.org/languages....
Definition DWARF/CompilationUnit.hpp:109
Language(LANG lang)
Definition DWARF/CompilationUnit.hpp:129
Language(Language &&)=default
Language(LANG lang, uint32_t version)
Definition DWARF/CompilationUnit.hpp:126
Language & operator=(Language &&)=default
LANG
Definition DWARF/CompilationUnit.hpp:111
@ DART
Definition DWARF/CompilationUnit.hpp:116
@ RUST
Definition DWARF/CompilationUnit.hpp:115
@ C
Definition DWARF/CompilationUnit.hpp:113
@ CPP
Definition DWARF/CompilationUnit.hpp:114
Language(const Language &)=default
Language & operator=(const Language &)=default
This class represents a DWARF compilation unit.
Definition DWARF/CompilationUnit.hpp:36
uint64_t high_address() const
Return the highest virtual address owned by this compilation unit.
vars_it variables() const
Return an iterator over all the variables defined in the this compilation unit:
types_it types() const
Return an iterator over the different types defined in this compilation unit.
Language language() const
Original Language of this compilation unit.
std::unique_ptr< Variable > find_variable(const std::string &name) const
Try to find the Variable with the given name.
CompilationUnit(std::unique_ptr< details::CompilationUnit > impl)
std::unique_ptr< Function > find_function(uint64_t addr) const
Try to find the function at the given address.
uint64_t size() const
Return the size of the compilation unit according to its range of address.
uint64_t low_address() const
Return the lowest virtual address owned by this compilation unit.
std::string name() const
Name of the file associated with this compilation unit (e.g. test.cpp) Return an empty string if the ...
std::string compilation_dir() const
Return the path to the directory in which the compilation took place for compiling this compilation u...
functions_it functions() const
Return an iterator over the functions implemented in this compilation unit.
std::unique_ptr< Function > find_function(const std::string &name) const
Try to find the function whose name is given in parameter.
std::unique_ptr< Variable > find_variable(uint64_t addr) const
Try to find the Variable at the given address.
std::string producer() const
Information about the program (or library) that generated this compilation unit. For instance,...
std::vector< range_t > ranges() const
Return a list of address ranges owned by this compilation unit.
Definition iterators.hpp:485
LIEF namespace.
Definition Abstract/Binary.hpp:32
#define LIEF_API
Definition visibility.h:41