Go to the documentation of this file.
15#ifndef LIEF_DWARF_EDITOR_COMPILATION_UNIT_H
16#define LIEF_DWARF_EDITOR_COMPILATION_UNIT_H
45 CompilationUnit&
set_producer(
const std::string& producer);
60 std::unique_ptr<EnumType>
create_enum(
const std::string& name);
63 std::unique_ptr<TypeDef>
create_typedef(
const std::string& name,
const Type& type);
70 const std::string& name, StructType::TYPE kind = StructType::TYPE::STRUCT);
71 std::unique_ptr<BaseType>
create_base_type(
const std::string& name,
size_t size,
74 BaseType::ENCODING encoding = BaseType::ENCODING::NONE);
86 std::unique_ptr<ArrayType>
89 create_array(
const std::string& name,
const Type& type,
size_t count);
94 std::unique_ptr<details::CompilationUnit> impl_;
This class represents an array type (DW_TAG_array_type).
Definition ArrayType.hpp:26
This class represents an editable DWARF compilation unit.
Definition DWARF/editor/CompilationUnit.hpp:41
std::unique_ptr< Function > create_function(const std::string &name)
Create a new function owned by this compilation unit.
std::unique_ptr< TypeDef > create_typedef(const std::string &name, const Type &type)
Create a typdef with the name provided in the first parameter which aliases the type provided in the ...
CompilationUnit(std::unique_ptr< details::CompilationUnit > impl)
std::unique_ptr< PointerType > create_pointer_type(const Type &ty)
Create a pointer on the provided type.
Definition DWARF/editor/CompilationUnit.hpp:80
std::unique_ptr< Type > create_generic_type(const std::string &name)
Create a DW_TAG_unspecified_type type with the given name.
std::unique_ptr< FunctionType > create_function_type(const std::string &name)
Create a function type with the given name.
std::unique_ptr< Variable > create_variable(const std::string &name)
Create a new global variable owned by this compilation unit.
std::unique_ptr< StructType > create_structure(const std::string &name, StructType::TYPE kind=StructType::TYPE::STRUCT)
Create a struct-like type (struct, class, union) with the given name.
CompilationUnit & set_producer(const std::string &producer)
Set the DW_AT_producer producer attribute.
std::unique_ptr< Type > create_void_type()
Create a void type.
std::unique_ptr< BaseType > create_base_type(const std::string &name, size_t size, BaseType::ENCODING encoding=BaseType::ENCODING::NONE)
Create a primitive type with the given name and size.
std::unique_ptr< EnumType > create_enum(const std::string &name)
Create an enum type (DW_TAG_enumeration_type)
std::unique_ptr< ArrayType > create_array(const std::string &name, const Type &type, size_t count)
Create an array type with the given name, type and size.
This class represents an editable enum type (DW_TAG_enumeration_type)
Definition EnumType.hpp:32
This class represents an editable DWARF function (DW_TAG_subprogram)
Definition DWARF/editor/Function.hpp:38
This class represents a typedef (DW_TAG_typedef).
Definition TypeDef.hpp:26
This class is the base class for any types created when editing DWARF debug info.
Definition DWARF/editor/Type.hpp:36
std::unique_ptr< PointerType > pointer_to() const
Create a pointer type pointing to this type.
This class represents an editable DWARF variable which can be scoped by a function or a compilation u...
Definition editor/Variable.hpp:33
Definition DWARF/editor/CompilationUnit.hpp:36
Namespace for the DWARF debug format.
Definition DWARF/CompilationUnit.hpp:28
LIEF namespace.
Definition Abstract/Binary.hpp:39
#define LIEF_API
Definition visibility.h:41