Struct lief::dwarf::editor::CompilationUnit
pub struct CompilationUnit<'a> { /* private fields */ }
Expand description
This structure represents an editable DWARF compilation unit
Implementations§
§impl CompilationUnit<'_>
impl CompilationUnit<'_>
pub fn set_producer(&mut self, value: &str)
pub fn set_producer(&mut self, value: &str)
Set the DW_AT_producer
producer attribute.
This attribute aims to inform about the program that generated this
compilation unit (e.g. LIEF Extended
)
pub fn create_function(&mut self, name: &str) -> Option<Function>
pub fn create_function(&mut self, name: &str) -> Option<Function>
Create a new function owned by this compilation unit
pub fn create_variable(&mut self, name: &str) -> Option<Variable>
pub fn create_variable(&mut self, name: &str) -> Option<Variable>
Create a new global variable owned by this compilation unit
pub fn create_generic_type(&mut self, name: &str) -> Type
pub fn create_generic_type(&mut self, name: &str) -> Type
Create a DW_TAG_unspecified_type
type with the given name
pub fn create_enum(&mut self, name: &str) -> Enum
pub fn create_enum(&mut self, name: &str) -> Enum
Create an enum type (DW_TAG_enumeration_type
)
pub fn create_typedef(&mut self, name: &str, ty: &dyn EditorType) -> Typedef
pub fn create_typedef(&mut self, name: &str, ty: &dyn EditorType) -> Typedef
Create a typdef with the name provided in the first parameter which aliases the type provided in the second parameter
pub fn create_structure(&mut self, name: &str) -> Struct
pub fn create_structure(&mut self, name: &str) -> Struct
Create a structure type (DW_TAG_structure_type
)
pub fn create_class(&mut self, name: &str) -> Struct
pub fn create_class(&mut self, name: &str) -> Struct
Create a structure type (DW_TAG_class_type
)
pub fn create_union(&mut self, name: &str) -> Struct
pub fn create_union(&mut self, name: &str) -> Struct
Create a union type (DW_TAG_union_type
)
pub fn create_base_type(
&mut self,
name: &str,
size: u64,
encoding: Encoding
) -> Base
pub fn create_base_type( &mut self, name: &str, size: u64, encoding: Encoding ) -> Base
Create a primitive type with the given name and size.
pub fn create_function_type(&mut self, name: &str) -> FunctionType
pub fn create_function_type(&mut self, name: &str) -> FunctionType
Create a function type with the given name.
pub fn create_pointer_type(&mut self, ty: &dyn EditorType) -> Pointer
pub fn create_pointer_type(&mut self, ty: &dyn EditorType) -> Pointer
Create a pointer on the provided type
pub fn create_void_type(&mut self) -> Type
pub fn create_void_type(&mut self) -> Type
Create a void
type
pub fn create_array_type(
&mut self,
name: &str,
ty: &dyn EditorType,
count: u64
) -> Array
pub fn create_array_type( &mut self, name: &str, ty: &dyn EditorType, count: u64 ) -> Array
Create an array type with the given name, type and size.