Simple Virtual Machine A simple but flexible virtual machine

Loading...
Searching...
No Matches
Functions
SVM memory read
SVM memories

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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.

## 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | address | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | pointer | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | address | The address of the zone to read from.
  [in] | size | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | address | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | address | The local address to read from.
  [in] | type | The type for type checking.

Returns
  The value associated to the address.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption when the address is not initialised.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | address | The local address to read from.
  [in] | type | The plugin type name for type checking.

Returns
  The value associated to the address.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  FAILURE | interruption when the type parameter does not identify a plugin type.
  MEMORY | interruption when the address is not initialised.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | address | The local address to read from.
  [in] | type | The internal type for type checking.

Returns
  The value associated to the address.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption when the address is not initialised.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | pointer | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | address | The address of the zone to read from.
  [in] | size | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | pointer | The pointer of the zone to read from.
  [in] | type | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption when at least one address is not initialised.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | address | The address of the zone to read from.
  [in] | size | The size of the zone to read from.
  [in] | type | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption when at least one address is not initialised.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | pointer | The pointer of the zone to read from.
  [in] | type | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption when at least one address is not initialised.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | address | The address of the zone to read from.
  [in] | size | The size of the zone to read from.
  [in] | type | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption when at least one address is not initialised.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | pointer | The pointer of the zone to read from.
  [in] | type | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption when at least one address is not initialised.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | address | The address of the zone to read from.
  [in] | size | The size of the zone to read from.
  [in] | type | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  MEMORY | interruption when at least one address is not initialised.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | pointer | The pointer of the zone to read from.
  [in] | zone | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  FAILURE | interruption when the zone and the pointer have different sizes.
  MEMORY | interruption when at least one address is not initialised.
  MEMORY | interruption 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] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | kernel | The kernel in which the targeted memory is.
  [in] | address | The address of the zone to read from.
  [in] | size | The size of the zone to read from.
  [in] | zone | The 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

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)
  FAILURE | interruption when the kernel is not owned by our process or is not in a process locked by ours.
  FAILURE | interruption when the zone has a size different from the size.
  MEMORY | interruption when at least one address is not initialised.
  MEMORY | interruption 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