event_provider exec_trace
API Reference Manual  /  5 Model-to-Simulator Interfaces  / 

exception

Description
The exception interface is used to translate exception numbers, as received by the Core_Exception hap, to names, and vice versa.

The get_number function returns the number associated with an exception name, or -1 if the no exception with the given name exist. The get_name returns the name associated with an exception number. The get_source function is only used on X86 targets and returns the source for an exception, as an exception number can be raised from different sources. The all_exceptions function returns a list of all exceptions numbers.

The exception numbers are architecturally defined, while their names are defined by the model.

SIM_INTERFACE(exception) {
        int (*get_number)(conf_object_t *NOTNULL obj,
                          const char *NOTNULL name);
        const char *(*get_name)(conf_object_t *NOTNULL obj, int exc);
        int (*get_source)(conf_object_t *NOTNULL obj, int exc);
        attr_value_t (*all_exceptions)(conf_object_t *NOTNULL obj);
};

#define EXCEPTION_INTERFACE "exception"

Execution Context
Cell Context for all methods.

event_provider exec_trace