Csound API  6.03
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Debugger

Data Structures

struct  debug_instr_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_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 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 csoundDebugContinue (CSOUND *csound)
 Continue execution from breakpoint. More...
 
PUBLIC void csoundDebugStop (CSOUND *csound)
 Stop Csound rendering and enter the debugger. More...
 
PUBLIC debug_instr_tcsoundDebugGetInstrInstances (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_tcsoundDebugGetVariables (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...
 

Detailed Description

Typedef Documentation

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 debug_instr_s debug_instr_t

Function Documentation

PUBLIC void csoundClearBreakpoints ( CSOUND csound)

Clear all breakpoints.

Removes all breakpoints. This call is thread safe, as it will be processed as soon as possible in the kperf function.

PUBLIC void csoundDebugContinue ( CSOUND csound)

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

PUBLIC void csoundDebuggerClean ( CSOUND csound)

Cleanup debugger facilities.

Parameters
csoundA Csound instance
PUBLIC void csoundDebuggerInit ( CSOUND csound)

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.

Parameters
csoundA 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.

PUBLIC debug_variable_t* csoundDebugGetVariables ( CSOUND csound,
debug_instr_t instr 
)

Get list of variables for instrument.

PUBLIC void csoundDebugStop ( CSOUND csound)

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.

PUBLIC void csoundRemoveInstrumentBreakpoint ( CSOUND csound,
MYFLT  instr 
)

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.

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.

Parameters
csoundCsound instance pointer
bkpt_cbpointer to breakpoint callback function
userdatapointer to user data that will be passed to the callback function
PUBLIC void csoundSetInstrumentBreakpoint ( CSOUND csound,
MYFLT  instr,
int  skip 
)

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.

Parameters
csounda Csound instance
instrinstrument number
skipnumber of control blocks to skip