The ddpi_section_create operation creates a Ddpi_Section object
to describe a range of storage.
Description
When the user calls the ddpi_section_create operation,
passing a character string as the parameter name, the operation copies the
content of name and sets section->ds_name to the copy. You
can deallocate the copy.
If the parent class has the same attributes
as another class (such as name, type, and location), this section is applied
to both instances of the class.
Prototype
int ddpi_section_create(
Ddpi_Class class_obj,
char * name,
Dwarf_Addr addr_low,
Dwarf_Addr addr_high,
int user_area_len,
Ddpi_Section* ret_section,
Ddpi_Error* error);
Parameters
- class_obj
- Input. This accepts the Ddpi_Class object.
- name
- Input. This accepts the section name.
- addr_low
- Input. This accepts the section start address
- addr_high
- Input. This accepts the section end address.
- user_area_len
- Input. This accepts the user area length.
- ret_section
- Output. This returns the Ddpi_Section object.
- error
- See The libddpi error parameter.
Return values
- DW_DLV_OK
- Returned upon successful creation of the section copy.
- DW_DLV_NO_ENTRY
- Never returned.
- DW_DLV_ERROR
- This value is returned if:
- class_obj is NULL
- The Ddpi_Info object associated with class_obj is
NULL.
- ret_section is NULL.
- An error occurs during allocation of memory for the new section.
- An error occurs during allocation of memory for the copy of the name.
- An error occurs during allocation of memory for the section list of the
parent class.
- user_area_len is less than zero.