This module contains API functions to handle symbols in SVM code.
More...
|
SVM_FUNCTION SVM_Boolean | svm_code_symbol_has_address (const void *svm, const SVM_Code code, const SVM_Value_String label) |
| This function checks whether a SVM code defines a symbol given as a string value. More...
|
|
SVM_FUNCTION SVM_Boolean | svm_code_symbol_has_address__string (const void *svm, const SVM_Code code, const SVM_String label) |
| This function checks whether a SVM code defines a symbol given as a SVM_String. More...
|
|
SVM_FUNCTION SVM_Boolean | svm_code_symbol_has_address__raw (const void *svm, const SVM_Code code, const char *label) |
| This function checks whether a SVM code defines a symbol given as a C nul-terminated string. More...
|
|
SVM_FUNCTION SVM_Value_String * | svm_code_symbol_list (const void *svm, const SVM_Code code) |
| This function returns all symbols defined in a SVM code. More...
|
|
SVM_FUNCTION SVM_Value_Symbol | svm_code_symbol_get_address (const void *svm, const SVM_Code code, const SVM_Value_String label) |
| This function solves a symbol in a SVM code given as a string value. More...
|
|
SVM_FUNCTION SVM_Value_Symbol | svm_code_symbol_get_address__string (const void *svm, const SVM_Code code, const SVM_String label) |
| This function solves a symbol in a SVM code given as a SVM_String. More...
|
|
SVM_FUNCTION SVM_Value_Symbol | svm_code_symbol_get_address__raw (const void *svm, const SVM_Code code, const char *label) |
| This function solves a symbol in a SVM code given as a C nul-terminated string. More...
|
|
This module contains API functions to handle symbols in SVM code.
◆ svm_code_symbol_get_address()
This function solves a symbol in a SVM code given as a string value.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | code | The code to be diagnosed. |
[in] | label | The label to solve. |
- Returns
- The symbol value containing the global address corresponding to the label.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
FAILURE | interruption when the label does not allow a global jump in the code. |
◆ svm_code_symbol_get_address__raw()
This function solves a symbol in a SVM code given as a C nul-terminated string.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | code | The code to be diagnosed. |
[in] | label | The label to solve. |
- Returns
- The symbol value containing the global address corresponding to the label.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
FAILURE | interruption when the label does not allow a global jump in the code. |
◆ svm_code_symbol_get_address__string()
This function solves a symbol in a SVM code given as a SVM_String.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | code | The code to be diagnosed. |
[in] | label | The label to solve. |
- Returns
- The symbol value containing the global address corresponding to the label.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
FAILURE | interruption when the label does not allow a global jump in the code. |
◆ svm_code_symbol_has_address()
This function checks whether a SVM code defines a symbol given as a string value.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | code | The code to be diagnosed. |
[in] | label | The label to solve. |
- Returns
- TRUE if the symbol is eligible to a global call in the SVM code, FALSE otherwise.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
◆ svm_code_symbol_has_address__raw()
This function checks whether a SVM code defines a symbol given as a C nul-terminated string.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | code | The code to be diagnosed. |
[in] | label | The label to solve. |
- Returns
- TRUE if the symbol is eligible to a global call in the SVM code, FALSE otherwise.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
◆ svm_code_symbol_has_address__string()
This function checks whether a SVM code defines a symbol given as a SVM_String.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | code | The code to be diagnosed. |
[in] | label | The label to solve. |
- Returns
- TRUE if the symbol is eligible to a global call in the SVM code, FALSE otherwise.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
◆ svm_code_symbol_list()
This function returns all symbols defined in a SVM code.
- Parameters
-
[in] | svm | The SVM pointer passed as first argument of the callback function. |
[in] | code | The code to be introspected. |
This function returns all symbols of a SVM code. Labels are not returned by this function.
- Returns
- A NULL terminated array of string values containing the symbol names.
- Note
- The returned array is a valid SVM variable: its scope can be changed if needed, and the pointer shall not be freed explicitely.
Usage example:
for( ; !label ; ++label)
{
}
SVM_TYPE typedef const void * SVM_Value_String
This type is used to represent a string the SVM can store in one of its memories.
Definition: svm.h:548
SVM_TYPE typedef const void * SVM_Value_Symbol
This type is used to represent a symbol the SVM can store in one of its memories.
Definition: svm.h:592
SVM_FUNCTION SVM_Value_Symbol svm_code_symbol_get_address(const void *svm, const SVM_Code code, const SVM_Value_String label)
This function solves a symbol in a SVM code given as a string value.
SVM_FUNCTION SVM_Value_String * svm_code_symbol_list(const void *svm, const SVM_Code code)
This function returns all symbols defined in a SVM code.
- Exceptions
-
FAILURE | interruption when a parameter is incorrect. (Please refer to the main description page of this API.) |
- See also
- svm_code_label_list