Csound API  6.18
csdebug.h File Reference

This header provides the debugger API which is part of libcsound. More...

#include "csoundCore.h"
#include "csound_type_system.h"

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_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

This header provides the debugger API which is part of libcsound.

Basic usage of the debugger is this:

CSOUND* csound = csoundCreate(NULL);
csoundCompileOrc(csound, " ");
csoundStart(csound);
csoundSetBreakpointCallback(csound, brkpt_cb, &userdata);
// Run Csound Performance here
// The breakpoint callback will be called when instrument 1 has been
// instantiated and 5 control blocks have been processed.
csoundDestroy(csound);