ddpi_space_create operation

The ddpi_space_create operation creates a Ddpi_Space object to represent a program address space and returns a descriptor that acts as a handle for accessing the space. The address space may be either an actual machine or post-mortem image. Alternative Ddpi_Info modes allow a single space to represent an application-executable module or a CU-level object file.

Description

When you call the ddpi_space_create operation, and pass a character string as the parameter name, the operation copies the content of the name parameter and stores it to a copy. After the operation returns the copy, you can deallocate the original name to save storage.

Prototype

int ddpi_space_create(
    Ddpi_Info             info, 
    Ddpi_Space_Type       type,     
    char*                 name,
    Ddpi_ASID             asid,
    Ddpi_ALET             alet,
    Dwarf_Addr            limit,
    Ddpi_GS_Handler       gs_handler,  
    Ddpi_SS_Handler       ss_handler,
    int                   user_area_len,
    Ddpi_Space*           ret_space,
    Ddpi_Error*           error); 

Parameters

info
Input. This accepts a Ddpi_Info object.
name
Input. This accepts an optional space name string. The given value can be NULL.
type
Input. This accepts a space type as described above.
asid
Input. This accepts a space ASID ID.
alet
Input. This accepts a space ALET ID.
limit
Input. This accepts the maximum address within space.
gs_handler
Input. This accepts the address of an operation that libddpi uses to read memory. If this operation is not provided, libddpi fails when it tries to read memory. The value can be NULL.
ss_handler
Input. This accepts the address of an operation that libddpi uses to write to memory. If this operation is not provided, libddpi generates an error when it needs to write to memory. The value can be NULL.
user_area_len
Input. This accepts the user-area length.
ret_space
Output. This returns the space object.
error
See The libddpi error parameter.

Return values

DW_DLV_OK
Returned upon successful return of the descriptor that acts as a handle for accessing the space.
DW_DLV_NO_ENTRY
Never returned.
DW_DLV_ERROR
Returned if:
  • info is NULL
  • ret_space is NULL
  • user_area_len is less than zero
  • An error occurs during memory allocation