Csound API
6.18
|
Data Structures | |
struct | debug_instr_s |
struct | debug_opcode_s |
struct | debug_variable_s |
struct | debug_bkpt_info_t |
struct | csdebug_data_s |
Typedefs | |
typedef struct debug_instr_s | debug_instr_t |
typedef struct debug_opcode_s | debug_opcode_t |
typedef struct debug_variable_s | debug_variable_t |
typedef void(* | breakpoint_cb_t) (CSOUND *, debug_bkpt_info_t *, void *userdata) |
Breakpoint callback function type. More... | |
typedef struct csdebug_data_s | csdebug_data_t |
Functions | |
PUBLIC void | csoundDebuggerInit (CSOUND *csound) |
Intialize debugger facilities. More... | |
PUBLIC void | csoundDebuggerClean (CSOUND *csound) |
Cleanup debugger facilities. More... | |
PUBLIC void | csoundSetBreakpoint (CSOUND *csound, int line, int instr, int skip) |
Set a breakpoint on a particular line. More... | |
PUBLIC void | csoundRemoveBreakpoint (CSOUND *csound, int line, int instr) |
Remove a previously set line breakpoint. More... | |
PUBLIC void | csoundSetInstrumentBreakpoint (CSOUND *csound, MYFLT instr, int skip) |
Set a breakpoint for an instrument number. More... | |
PUBLIC void | csoundRemoveInstrumentBreakpoint (CSOUND *csound, MYFLT instr) |
Remove instrument breakpoint. More... | |
PUBLIC void | csoundClearBreakpoints (CSOUND *csound) |
Clear all breakpoints. More... | |
PUBLIC void | csoundSetBreakpointCallback (CSOUND *csound, breakpoint_cb_t bkpt_cb, void *userdata) |
Sets the breakpoint callback function. More... | |
PUBLIC void | csoundDebugNext (CSOUND *csound) |
Continue execution and break at next instrument instance. More... | |
PUBLIC void | csoundDebugContinue (CSOUND *csound) |
Continue execution from breakpoint. More... | |
PUBLIC void | csoundDebugStop (CSOUND *csound) |
Stop Csound rendering and enter the debugger. More... | |
PUBLIC debug_instr_t * | csoundDebugGetInstrInstances (CSOUND *csound) |
Get a list of active instrument instances Returns a linked list of allocated instrument instances csoundDebugFreeInstrInstances() must be called on the list once it is no longer needed. More... | |
PUBLIC void | csoundDebugFreeInstrInstances (CSOUND *csound, debug_instr_t *instr) |
Free list created by csoundDebugGetCurrentInstrInstance() or csoundDebugGetInstrInstances() More... | |
PUBLIC debug_variable_t * | csoundDebugGetVariables (CSOUND *csound, debug_instr_t *instr) |
Get list of variables for instrument. More... | |
PUBLIC void | csoundDebugFreeVariables (CSOUND *csound, debug_variable_t *varHead) |
Free variable list generated by csoundDebugGetVariables() More... | |
typedef void(* breakpoint_cb_t) (CSOUND *, debug_bkpt_info_t *, void *userdata) |
Breakpoint callback function type.
When a breakpoint is reached, the debugger will call a function of this type see csoundSetBreakpointCallback()
typedef struct csdebug_data_s csdebug_data_t |
typedef struct debug_instr_s debug_instr_t |
typedef struct debug_opcode_s debug_opcode_t |
typedef struct debug_variable_s debug_variable_t |
Clear all breakpoints.
Removes all breakpoints. This call is thread safe, as it will be processed as soon as possible in the kperf function.
Continue execution from breakpoint.
Call this function to continue execution of a Csound instance which is stopped because a breakpoint has been reached. This function will continue traversing the instrument chain from the instrument instance that triggered the break.
PUBLIC void csoundDebugFreeInstrInstances | ( | CSOUND * | csound, |
debug_instr_t * | instr | ||
) |
Free list created by csoundDebugGetCurrentInstrInstance() or csoundDebugGetInstrInstances()
PUBLIC void csoundDebugFreeVariables | ( | CSOUND * | csound, |
debug_variable_t * | varHead | ||
) |
Free variable list generated by csoundDebugGetVariables()
Cleanup debugger facilities.
csound | A Csound instance |
Intialize debugger facilities.
This function allocates debugger structures, and enables its usage. There is a small performance penalty when using the debugger, so be sure to call csoundDebuggerClean() after use.
This call is not thread safe and must be called before performance starts.
csound | A Csound instance |
PUBLIC debug_instr_t* csoundDebugGetInstrInstances | ( | CSOUND * | csound | ) |
Get a list of active instrument instances Returns a linked list of allocated instrument instances csoundDebugFreeInstrInstances() must be called on the list once it is no longer needed.
This function is not thread safe and should only be called while the csound engine is stopped at a breakpoint.
PUBLIC debug_variable_t* csoundDebugGetVariables | ( | CSOUND * | csound, |
debug_instr_t * | instr | ||
) |
Get list of variables for instrument.
Continue execution and break at next instrument instance.
Call this function to continue execution but automatically stop at next instrument instance.
Stop Csound rendering and enter the debugger.
Calling this function will enter the debugger at the soonest possible point as if a breakpoint had been reached.
Remove a previously set line breakpoint.
Remove instrument breakpoint.
Removes an instrument breakpoint from the breakpoint list. Csound will no longer break at that instrument
This call is thread safe, as the breakpoint will be put in a lock free queue that is processed as soon as possible in the kperf function.
Set a breakpoint on a particular line.
csound | A Csound instance |
line | The line on which to set a breakpoint |
instr | When set to 0, the line number refers to the line number in the score. When a number is given, it should refer to an instrument that has been compiled on the fly using csoundParseOrc(). |
skip | number of control blocks to skip |
PUBLIC void csoundSetBreakpointCallback | ( | CSOUND * | csound, |
breakpoint_cb_t | bkpt_cb, | ||
void * | userdata | ||
) |
Sets the breakpoint callback function.
Sets the function that will be called when a breakpoint is reached.
csound | Csound instance pointer |
bkpt_cb | pointer to breakpoint callback function |
userdata | pointer to user data that will be passed to the callback function |
Set a breakpoint for an instrument number.
Sets a breakpoint for an instrument number with optional number of skip control blocks. You can specify a fractional instrument number to identify particular instances. Specifying a value greater than 1 will result in that number of control blocks being skipped before this breakpoint is called again. A value of 0 and 1 has the same effect.
This call is thread safe, as the breakpoint will be put in a lock free queue that is processed as soon as possible in the kperf function.
csound | a Csound instance |
instr | instrument number |
skip | number of control blocks to skip |