Simple Virtual Machine A simple but flexible virtual machine

Functions
SVM debugger form
SVM debugger

This module contains API functions to handle SVM debugger forms. More...

## Functions
SVM_FUNCTION SVM_Debug_Form | svm_debug_form_new (const void *svm, const char *title)
| This function creates a debugger form. More...
SVM_FUNCTION void | svm_debug_form_append_checkbox (const void *svm, SVM_Debug_Form form, const char *label, const SVM_Value_Boolean default_value)
| This function appends to a debugger form a checkbox field. More...
SVM_FUNCTION void | svm_debug_form_append_checkbox__raw (const void *svm, SVM_Debug_Form form, const char *label, const int default_value)
| This function appends to a debugger form a checkbox field. More...
SVM_FUNCTION void | svm_debug_form_append_selection (const void *svm, SVM_Debug_Form form, const char *label, const SVM_Size size, const SVM_Value *values)
| This function appends to a debugger form a list of selection field. More...
SVM_FUNCTION void | svm_debug_form_append_integer (const void *svm, SVM_Debug_Form form, const char *label, const SVM_Value_Integer default_value, const long long int min_value, const long long int max_value)
| This function appends to a debugger form an input field accepting integers. More...
SVM_FUNCTION void | svm_debug_form_append_integer__raw (const void *svm, SVM_Debug_Form form, const char *label, const long long int default_value, const long long int min_value, const long long int max_value)
| This function appends to a debugger form an input field accepting integers. More...
SVM_FUNCTION void | svm_debug_form_append_string (const void *svm, SVM_Debug_Form form, const char *label, const SVM_Value_String default_value, const SVM_Size min_size, const SVM_Size max_size)
| This function appends to a debugger form an input field accepting strings. More...
SVM_FUNCTION void | svm_debug_form_append_string__string (const void *svm, SVM_Debug_Form form, const char *label, const SVM_String default_value, const SVM_Size min_size, const SVM_Size max_size)
| This function appends to a debugger form an input field accepting strings. More...
SVM_FUNCTION void | svm_debug_form_append_string__raw (const void *svm, SVM_Debug_Form form, const char *label, const char *default_value, const SVM_Size min_size, const SVM_Size max_size)
| This function appends to a debugger form an input field accepting strings. More...
SVM_FUNCTION void | svm_debug_form_append_text (const void *svm, SVM_Debug_Form form, const char *label, const SVM_Size width, const SVM_Size height)
| This function appends to a debugger form an input field accepting long multi-line strings. More...
SVM_FUNCTION SVM_Value * | svm_debug_form_request (const void *svm, const SVM_Debug_Form form)
| This function sends the form to the debugger user interface, and waits for the form submission. More...

## Detailed Description

This module contains API functions to handle SVM debugger forms.

## Function Documentation

## ◆ svm_debug_form_append_checkbox()

SVM_FUNCTION void svm_debug_form_append_checkbox | ( | const void * | svm,
|  | SVM_Debug_Form | form,
|  | const char * | label,
|  | const SVM_Value_Boolean | default_value
| ) |  |

This function appends to a debugger form a checkbox field.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | form | The debugger form to update.
  [in] | label | The field label of this value.
  [in] | default_value | The initial state of the field value.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)

## ◆ svm_debug_form_append_checkbox__raw()

SVM_FUNCTION void svm_debug_form_append_checkbox__raw | ( | const void * | svm,
|  | SVM_Debug_Form | form,
|  | const char * | label,
|  | const int | default_value
| ) |  |

This function appends to a debugger form a checkbox field.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | form | The debugger form to update.
  [in] | label | The field label of this value.
  [in] | default_value | The initial state of the field value.

The default value can also be a SVM_Boolean.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)

## ◆ svm_debug_form_append_integer()

SVM_FUNCTION void svm_debug_form_append_integer | ( | const void * | svm,
|  | SVM_Debug_Form | form,
|  | const char * | label,
|  | const SVM_Value_Integer | default_value,
|  | const long long int | min_value,
|  | const long long int | max_value
| ) |  |

This function appends to a debugger form an input field accepting integers.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | form | The debugger form to update.
  [in] | label | The field label of this value.
  [in] | default_value | The initial value of the field value.
  [in] | min_value | The minimal value to be accepted in the form.
  [in] | max_value | The maximal value to be accepted in the form.

Note
  When the maximal value is inferior to the minimal value, the boundary check is disabled.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)

## ◆ svm_debug_form_append_integer__raw()

SVM_FUNCTION void svm_debug_form_append_integer__raw | ( | const void * | svm,
|  | SVM_Debug_Form | form,
|  | const char * | label,
|  | const long long int | default_value,
|  | const long long int | min_value,
|  | const long long int | max_value
| ) |  |

This function appends to a debugger form an input field accepting integers.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | form | The debugger form to update.
  [in] | label | The field label of this value.
  [in] | default_value | The initial value of the field value.
  [in] | min_value | The minimal value to be accepted in the form.
  [in] | max_value | The maximal value to be accepted in the form.

Note
  When the maximal value is inferior to the minimal value, the boundary check is disabled.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)

## ◆ svm_debug_form_append_selection()

SVM_FUNCTION void svm_debug_form_append_selection | ( | const void * | svm,
|  | SVM_Debug_Form | form,
|  | const char * | label,
|  | const SVM_Size | size,
|  | const SVM_Value * | values
| ) |  |

This function appends to a debugger form a list of selection field.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | form | The debugger form to update.
  [in] | label | The field label of this value.
  [in] | size | The number of enumerated values.
  [in] | values | The enumerated values.

The default value is the first one in the array.

Warning
  If the values size is smaller than size, it will result in an undefined behavior.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)

See also
  svm_value_array_new

## ◆ svm_debug_form_append_string()

SVM_FUNCTION void svm_debug_form_append_string | ( | const void * | svm,
|  | SVM_Debug_Form | form,
|  | const char * | label,
|  | const SVM_Value_String | default_value,
|  | const SVM_Size | min_size,
|  | const SVM_Size | max_size
| ) |  |

This function appends to a debugger form an input field accepting strings.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | form | The debugger form to update.
  [in] | label | The field label of this value.
  [in] | default_value | The initial value of the field value.
  [in] | min_size | The minimal value to be accepted in the form.
  [in] | max_size | The maximal value to be accepted in the form.

Note
  When the maximal value is inferior to the minimal value, the size check is disabled.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)

## ◆ svm_debug_form_append_string__raw()

SVM_FUNCTION void svm_debug_form_append_string__raw | ( | const void * | svm,
|  | SVM_Debug_Form | form,
|  | const char * | label,
|  | const char * | default_value,
|  | const SVM_Size | min_size,
|  | const SVM_Size | max_size
| ) |  |

This function appends to a debugger form an input field accepting strings.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | form | The debugger form to update.
  [in] | label | The field label of this value.
  [in] | default_value | The initial value of the field value.
  [in] | min_size | The minimal value to be accepted in the form.
  [in] | max_size | The maximal value to be accepted in the form.

Note
  When the maximal value is inferior to the minimal value, the size check is disabled.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)

## ◆ svm_debug_form_append_string__string()

SVM_FUNCTION void svm_debug_form_append_string__string | ( | const void * | svm,
|  | SVM_Debug_Form | form,
|  | const char * | label,
|  | const SVM_String | default_value,
|  | const SVM_Size | min_size,
|  | const SVM_Size | max_size
| ) |  |

This function appends to a debugger form an input field accepting strings.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | form | The debugger form to update.
  [in] | label | The field label of this value.
  [in] | default_value | The initial value of the field value.
  [in] | min_size | The minimal value to be accepted in the form.
  [in] | max_size | The maximal value to be accepted in the form.

Note
  When the maximal value is inferior to the minimal value, the size check is disabled.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)

## ◆ svm_debug_form_append_text()

SVM_FUNCTION void svm_debug_form_append_text | ( | const void * | svm,
|  | SVM_Debug_Form | form,
|  | const char * | label,
|  | const SVM_Size | width,
|  | const SVM_Size | height
| ) |  |

This function appends to a debugger form an input field accepting long multi-line strings.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in,out] | form | The debugger form to update.
  [in] | label | The field label of this value.
  [in] | width | The field width, in number of characters.
  [in] | height | The field height, in number of characters.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)

## ◆ svm_debug_form_new()

SVM_FUNCTION SVM_Debug_Form svm_debug_form_new | ( | const void * | svm,
|  | const char * | title
| ) |  |

This function creates a debugger form.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | title | The form title.

Returns
  An empty debugger form.

Exceptions

  FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.)

## ◆ svm_debug_form_request()

SVM_FUNCTION SVM_Value * svm_debug_form_request | ( | const void * | svm,
|  | const SVM_Debug_Form | form
| ) |  |

This function sends the form to the debugger user interface, and waits for the form submission.

Parameters

  [in] | svm | The SVM pointer passed as first argument of the callback function.
  [in] | form | The debugger form to send.

Warning
  While waiting the user to submit the form, the current process is under a specific breakpoint disallowing execution until the form is submitted.

Note
  When the debugger is not active or when an error happens, a null pointer is returned.

Returns
  An array of values containing the values in the order of the fields in the form. The array has an extra null pointer at its end.

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