Simple Virtual Machine
A simple but flexible virtual machine
SVM memory read

This module contains API functions to handle SVM memory read access. More...

Functions

SVM_FUNCTION SVM_Value svm_memory_read_address (const void *svm, const SVM_Kernel kernel, const SVM_Address address)
 This function reads a value from a memory. More...
 
SVM_FUNCTION SVM_Value svm_memory_read_address_type (const void *svm, const SVM_Kernel kernel, const SVM_Address address, const SVM_Type type)
 This function reads a value from a memory having a given type. More...
 
SVM_FUNCTION SVM_Value svm_memory_read_address_type_internal (const void *svm, const SVM_Kernel kernel, const SVM_Address address, const SVM_Type_Internal type)
 This function reads a value from a memory having a given internal type. More...
 
SVM_FUNCTION SVM_Value svm_memory_read_address_type_external (const void *svm, const SVM_Kernel kernel, const SVM_Address address, const SVM_Value_PluginEntryPoint type)
 This function reads a value from a memory having a given plugin type. More...
 
SVM_FUNCTION SVM_Value svm_memory_extract_address (const void *svm, const SVM_Kernel kernel, const SVM_Address address)
 This function extracts a value from a memory. More...
 
SVM_FUNCTION SVM_Valuesvm_memory_read_pointer (const void *svm, const SVM_Kernel kernel, const SVM_Value_Pointer pointer)
 This function reads an array of values from a memory. More...
 
SVM_FUNCTION SVM_Valuesvm_memory_read_pointer__raw (const void *svm, const SVM_Kernel kernel, const SVM_Address address, const SVM_Size size)
 This function reads an array of values from a memory. More...
 
SVM_FUNCTION SVM_Valuesvm_memory_read_pointer_type (const void *svm, const SVM_Kernel kernel, const SVM_Value_Pointer pointer, const SVM_Type type)
 This function reads an array of values from a memory with unique type checking. More...
 
SVM_FUNCTION SVM_Valuesvm_memory_read_pointer_type__raw (const void *svm, const SVM_Kernel kernel, const SVM_Address address, const SVM_Size size, const SVM_Type type)
 This function reads an array of values from a memory with unique type checking. More...
 
SVM_FUNCTION SVM_Valuesvm_memory_read_pointer_type_internal (const void *svm, const SVM_Kernel kernel, const SVM_Value_Pointer pointer, const SVM_Type_Internal type)
 This function reads an array of values from a memory with unique type checking against an internal type. More...
 
SVM_FUNCTION SVM_Valuesvm_memory_read_pointer_type_internal__raw (const void *svm, const SVM_Kernel kernel, const SVM_Address address, const SVM_Size size, const SVM_Type_Internal type)
 This function reads an array of values from a memory with unique type checking against an internal type. More...
 
SVM_FUNCTION SVM_Valuesvm_memory_read_pointer_type_external (const void *svm, const SVM_Kernel kernel, const SVM_Value_Pointer pointer, const SVM_Value_PluginEntryPoint type)
 This function reads an array of values from a memory with unique type checking against an external type. More...
 
SVM_FUNCTION SVM_Valuesvm_memory_read_pointer_type_external__raw (const void *svm, const SVM_Kernel kernel, const SVM_Address address, const SVM_Size size, const SVM_Value_PluginEntryPoint type)
 This function reads an array of values from a memory with unique type checking against an external type. More...
 
SVM_FUNCTION SVM_Valuesvm_memory_read_pointer_zone (const void *svm, const SVM_Kernel kernel, const SVM_Value_Pointer pointer, const SVM_Memory_Zone zone)
 This function reads an array of values from a memory with detailed type checking. More...
 
SVM_FUNCTION SVM_Valuesvm_memory_read_pointer_zone__raw (const void *svm, const SVM_Kernel kernel, const SVM_Address address, const SVM_Size size, const SVM_Memory_Zone zone)
 This function reads an array of values from a memory with detailed type checking. More...
 
SVM_FUNCTION SVM_Valuesvm_memory_extract_pointer (const void *svm, const SVM_Kernel kernel, const SVM_Value_Pointer pointer)
 This function extracts an array of values from a memory. More...
 
SVM_FUNCTION SVM_Valuesvm_memory_extract_pointer__raw (const void *svm, const SVM_Kernel kernel, const SVM_Address address, const SVM_Size size)
 This function reads an array of values from a memory. More...
 

Detailed Description

This module contains API functions to handle SVM memory read access.

Function Documentation

◆ svm_memory_extract_address()

SVM_FUNCTION SVM_Value svm_memory_extract_address ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Address  address 
)

This function extracts a value from a memory.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]addressThe local address to read from.
Note
The type of the read value is not checked at all.
Returns
The value associated to the address, or a null value when the address is not initialised.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when the address is not defined.
See also
svm_memory_address_is_defined
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_extract_pointer()

SVM_FUNCTION SVM_Value * svm_memory_extract_pointer ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Value_Pointer  pointer 
)

This function extracts an array of values from a memory.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]pointerThe pointer of the zone to read from.
Note
The types of the read values are not checked at all.
Returns
The array of values associated to the pointer with null values for non-initialised addresses, terminated by a C/C++ null pointer.
Note
The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when at least one address is not defined.
See also
svm_memory_address_is_defined
svm_memory_read_address
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_extract_pointer__raw()

SVM_FUNCTION SVM_Value * svm_memory_extract_pointer__raw ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Address  address,
const SVM_Size  size 
)

This function reads an array of values from a memory.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]addressThe address of the zone to read from.
[in]sizeThe size of the zone to read from.
Note
The types of the read values are not checked at all.
Returns
The array of values associated to the pointer with nul values for non-initialised addresses, terminated by a C/C++ null pointer.
Note
The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when at least one address is not defined.
See also
svm_memory_address_is_defined
svm_memory_read_address
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_read_address()

SVM_FUNCTION SVM_Value svm_memory_read_address ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Address  address 
)

This function reads a value from a memory.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]addressThe local address to read from.
Note
The type of the read value is not checked at all.
Returns
The value associated to the address.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when the address is not initialised.
See also
svm_memory_address_is_initialised
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_read_address_type()

SVM_FUNCTION SVM_Value svm_memory_read_address_type ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Address  address,
const SVM_Type  type 
)

This function reads a value from a memory having a given type.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]addressThe local address to read from.
[in]typeThe type for type checking.
Returns
The value associated to the address.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when the address is not initialised.
MEMORYinterruption when the address does not contains a value of the expected type.
See also
svm_memory_address_is_initialised
svm_memory_address_get_type
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_read_address_type_external()

SVM_FUNCTION SVM_Value svm_memory_read_address_type_external ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Address  address,
const SVM_Value_PluginEntryPoint  type 
)

This function reads a value from a memory having a given plugin type.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]addressThe local address to read from.
[in]typeThe plugin type name for type checking.
Returns
The value associated to the address.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
FAILUREinterruption when the type parameter does not identify a plugin type.
MEMORYinterruption when the address is not initialised.
MEMORYinterruption when the address does not contains a value of the expected type.
See also
svm_memory_address_is_initialised
svm_memory_address_get_type
svm_memory_address_get_type_name
svm_plugin_has_type
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_read_address_type_internal()

SVM_FUNCTION SVM_Value svm_memory_read_address_type_internal ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Address  address,
const SVM_Type_Internal  type 
)

This function reads a value from a memory having a given internal type.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]addressThe local address to read from.
[in]typeThe internal type for type checking.
Returns
The value associated to the address.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when the address is not initialised.
MEMORYinterruption when the address does not contains a value of the expected type.
See also
svm_memory_address_is_initialised
svm_memory_address_get_type
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_read_pointer()

SVM_FUNCTION SVM_Value * svm_memory_read_pointer ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Value_Pointer  pointer 
)

This function reads an array of values from a memory.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]pointerThe pointer of the zone to read from.
Note
The types of the read values are not checked at all.
Returns
The array of values associated to the pointer, terminated by a C/C++ null pointer.
Note
The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when at least one address is not initialised.
See also
svm_memory_address_is_initialised
svm_memory_read_address
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_read_pointer__raw()

SVM_FUNCTION SVM_Value * svm_memory_read_pointer__raw ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Address  address,
const SVM_Size  size 
)

This function reads an array of values from a memory.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]addressThe address of the zone to read from.
[in]sizeThe size of the zone to read from.
Note
The types of the read values are not checked at all.
Returns
The array of values associated to the pointer, terminated by a C/C++ null pointer.
Note
The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when at least one address is not initialised.
See also
svm_memory_address_is_initialised
svm_memory_read_address
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_read_pointer_type()

SVM_FUNCTION SVM_Value * svm_memory_read_pointer_type ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Value_Pointer  pointer,
const SVM_Type  type 
)

This function reads an array of values from a memory with unique type checking.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]pointerThe pointer of the zone to read from.
[in]typeThe type for type checking.
Returns
The array of values associated to the pointer, terminated by a C/C++ null pointer.
Note
The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when at least one address is not initialised.
MEMORYinterruption when at least one address does not contains a value of the expected type.
See also
svm_memory_address_is_initialised
svm_memory_read_address
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_read_pointer_type__raw()

SVM_FUNCTION SVM_Value * svm_memory_read_pointer_type__raw ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Address  address,
const SVM_Size  size,
const SVM_Type  type 
)

This function reads an array of values from a memory with unique type checking.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]addressThe address of the zone to read from.
[in]sizeThe size of the zone to read from.
[in]typeThe type for type checking.
Returns
The array of values associated to the pointer, terminated by a C/C++ null pointer.
Note
The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when at least one address is not initialised.
MEMORYinterruption when at least one address does not contains a value of the expected type.
See also
svm_memory_address_is_initialised
svm_memory_read_address
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_read_pointer_type_external()

SVM_FUNCTION SVM_Value * svm_memory_read_pointer_type_external ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Value_Pointer  pointer,
const SVM_Value_PluginEntryPoint  type 
)

This function reads an array of values from a memory with unique type checking against an external type.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]pointerThe pointer of the zone to read from.
[in]typeThe plugin type name for type checking.
Returns
The array of values associated to the pointer, terminated by a C/C++ null pointer.
Note
The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when at least one address is not initialised.
MEMORYinterruption when at least one address does not contains a value of the expected type.
See also
svm_memory_address_is_initialised
svm_memory_read_address
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_read_pointer_type_external__raw()

SVM_FUNCTION SVM_Value * svm_memory_read_pointer_type_external__raw ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Address  address,
const SVM_Size  size,
const SVM_Value_PluginEntryPoint  type 
)

This function reads an array of values from a memory with unique type checking against an external type.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]addressThe address of the zone to read from.
[in]sizeThe size of the zone to read from.
[in]typeThe plugin type name for type checking.
Returns
The array of values associated to the pointer, terminated by a C/C++ null pointer.
Note
The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when at least one address is not initialised.
MEMORYinterruption when at least one address does not contains a value of the expected type.
See also
svm_memory_address_is_initialised
svm_memory_read_address
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_read_pointer_type_internal()

SVM_FUNCTION SVM_Value * svm_memory_read_pointer_type_internal ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Value_Pointer  pointer,
const SVM_Type_Internal  type 
)

This function reads an array of values from a memory with unique type checking against an internal type.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]pointerThe pointer of the zone to read from.
[in]typeThe internal type for type checking.
Returns
The array of values associated to the pointer, terminated by a C/C++ null pointer.
Note
The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when at least one address is not initialised.
MEMORYinterruption when at least one address does not contains a value of the expected type.
See also
svm_memory_address_is_initialised
svm_memory_read_address
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_read_pointer_type_internal__raw()

SVM_FUNCTION SVM_Value * svm_memory_read_pointer_type_internal__raw ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Address  address,
const SVM_Size  size,
const SVM_Type_Internal  type 
)

This function reads an array of values from a memory with unique type checking against an internal type.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]addressThe address of the zone to read from.
[in]sizeThe size of the zone to read from.
[in]typeThe internal type for type checking.
Returns
The array of values associated to the pointer, terminated by a C/C++ null pointer.
Note
The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
MEMORYinterruption when at least one address is not initialised.
MEMORYinterruption when at least one address does not contains a value of the expected type.
See also
svm_memory_address_is_initialised
svm_memory_read_address
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_read_pointer_zone()

SVM_FUNCTION SVM_Value * svm_memory_read_pointer_zone ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Value_Pointer  pointer,
const SVM_Memory_Zone  zone 
)

This function reads an array of values from a memory with detailed type checking.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]pointerThe pointer of the zone to read from.
[in]zoneThe zone for type checking.

When the type at a read address is compared to the type AUTO in the memory zone, the type checking is disabled for this address.

Returns
The array of values associated to the pointer, terminated by a C/C++ null pointer.
Note
The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
FAILUREinterruption when the zone and the pointer have different sizes.
MEMORYinterruption when at least one address is not initialised.
MEMORYinterruption when at least one address does not contains a value of the expected type.
See also
svm_memory_address_is_initialised
svm_memory_read_address
svm_process_ownership_lock
svm_kernel_get_current

◆ svm_memory_read_pointer_zone__raw()

SVM_FUNCTION SVM_Value * svm_memory_read_pointer_zone__raw ( const void *  svm,
const SVM_Kernel  kernel,
const SVM_Address  address,
const SVM_Size  size,
const SVM_Memory_Zone  zone 
)

This function reads an array of values from a memory with detailed type checking.

Parameters
[in]svmThe SVM pointer passed as first argument of the callback function.
[in]kernelThe kernel in which the targeted memory is.
[in]addressThe address of the zone to read from.
[in]sizeThe size of the zone to read from.
[in]zoneThe zone for type checking.
Returns
The array of values associated to the pointer, terminated by a C/C++ null pointer.
Note
The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.
Exceptions
FAILUREinterruption when a parameter is incorrect. (Please refer to the main description page of this API.)
FAILUREinterruption when the kernel is not owned by our process or is not in a process locked by ours.
FAILUREinterruption when the zone has a size different from the size.
MEMORYinterruption when at least one address is not initialised.
MEMORYinterruption when at least one address does not contains a value of the expected type.
See also
svm_memory_address_is_initialised
svm_memory_read_address
svm_process_ownership_lock
svm_kernel_get_current