This interface is used to perform stepping with the debugger, on a specified debug context.
For all functions that return an attr_value_t
, that return value
will consists of a list with two elements. The first element is an error code
of debugger_error_t
type (see debug_query
interface documentation for definition). The second element depends on the
first. If the first element is Debugger_No_Error
, meaning that
the function went well, then the second element will contain the expected
return value that is specified per function below. If the first element is
another error code, then the second element will be a string describing the
error that occurred.
instruction_into and instruction_over runs one step forward for the specified context. instruction_into will enter subroutine calls while instruction_over will step over subroutine calls.
into and over will run one source line forward for the specified context. into will enter function calls while over will skip over functions.
out will run until the currently active function returns.
reverse_instruction_into and reverse_instruction_over are the reverse versions of instruction_into and instruction_over respectively. They will take the simulation one step backwards. reverse_instruction_into will enter subroutine calls while reverse_instruction_over will step past subroutine calls.
reverse_into and reverse_over are the reverse versions of into and over respectively. They will take the simulation on source line backwards. reverse_into will enter functions while reverse_over will not.
reverse_out will run in reverse until before the currently active function was called.
All function take a context ID, ctx_id, as argument. This context
ID is passed as an argument to callbacks for functions in the
debug_notification
interface. The context, that is passed to
functions in this interface, has to have state (see
context_has_state in the debug_query
interface)
otherwise a Debugger_Context_Does_Not_Have_State
error will be
returned.
Calling functions in this interface can only be done when simulation is
stopped, otherwise a Debugger_Already_Running
error will be
returned.
For all functions in this interface, if another stop reason occurs before a function finishes the simulation will stop at that point instead.
Stepping for a context that is not active will run until that context becomes active and then take the step.
SIM_INTERFACE(debug_step) { attr_value_t (*instruction_into)(conf_object_t *NOTNULL obj, const char *NOTNULL ctx_id); attr_value_t (*into)(conf_object_t *NOTNULL obj, const char *NOTNULL ctx_id); attr_value_t (*instruction_over)(conf_object_t *NOTNULL obj, const char *NOTNULL ctx_id); attr_value_t (*over)(conf_object_t *NOTNULL obj, const char *NOTNULL ctx_id); attr_value_t (*out)(conf_object_t *NOTNULL obj, const char *NOTNULL ctx_id); attr_value_t (*reverse_instruction_into)(conf_object_t *NOTNULL obj, const char *NOTNULL ctx_id); attr_value_t (*reverse_into)(conf_object_t *NOTNULL obj, const char *NOTNULL ctx_id); attr_value_t (*reverse_instruction_over)(conf_object_t *NOTNULL obj, const char *NOTNULL ctx_id); attr_value_t (*reverse_over)(conf_object_t *NOTNULL obj, const char *NOTNULL ctx_id); attr_value_t (*reverse_out)(conf_object_t *NOTNULL obj, const char *NOTNULL ctx_id); }; #define DEBUG_STEP_INTERFACE "debug_step"