Loading...
Searching...
No Matches
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.
typedef struct csdebug_data_s | csdebug_data_t

## Functions

PUBLIC void | csoundDebuggerInit (CSOUND *csound)
| Intialize debugger facilities.
PUBLIC void | csoundDebuggerClean (CSOUND *csound)
| Cleanup debugger facilities.
PUBLIC void | csoundSetBreakpoint (CSOUND *csound, int line, int instr, int skip)
| Set a breakpoint on a particular line.
PUBLIC void | csoundRemoveBreakpoint (CSOUND *csound, int line, int instr)
| Remove a previously set line breakpoint.
PUBLIC void | csoundSetInstrumentBreakpoint (CSOUND *csound, MYFLT instr, int skip)
| Set a breakpoint for an instrument number.
PUBLIC void | csoundRemoveInstrumentBreakpoint (CSOUND *csound, MYFLT instr)
| Remove instrument breakpoint.
PUBLIC void | csoundClearBreakpoints (CSOUND *csound)
| Clear all breakpoints.
PUBLIC void | csoundSetBreakpointCallback (CSOUND *csound, breakpoint_cb_t bkpt_cb, void *userdata)
| Sets the breakpoint callback function.
PUBLIC void | csoundDebugNext (CSOUND *csound)
| Continue execution and break at next instrument instance.
PUBLIC void | csoundDebugContinue (CSOUND *csound)
| Continue execution from breakpoint.
PUBLIC void | csoundDebugStop (CSOUND *csound)
| Stop Csound rendering and enter the debugger.
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 void | csoundDebugFreeInstrInstances (CSOUND *csound, debug_instr_t *instr)
| Free list created by csoundDebugGetCurrentInstrInstance() or csoundDebugGetInstrInstances().
PUBLIC debug_variable_t * | csoundDebugGetVariables (CSOUND *csound, debug_instr_t *instr)
| Get list of variables for instrument.
PUBLIC void | csoundDebugFreeVariables (CSOUND *csound, debug_variable_t *varHead)
| Free variable list generated by csoundDebugGetVariables().

## 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);
csoundDebuggerInit(csound);
csoundSetBreakpointCallback(csound, brkpt_cb, &userdata);
csoundSetInstrumentBreakpoint(csound, 1, 5);
// Run Csound Performance here
// The breakpoint callback will be called when instrument 1 has been
// instantiated and 5 control blocks have been processed.
csoundDebuggerClean(csound);
csoundDestroy(csound);
CSOUND
struct CSOUND_ CSOUND
Definition csound.h:475
csoundDebuggerClean
PUBLIC void csoundDebuggerClean(CSOUND *csound)
Cleanup debugger facilities.
csoundSetInstrumentBreakpoint
PUBLIC void csoundSetInstrumentBreakpoint(CSOUND *csound, MYFLT instr, int skip)
Set a breakpoint for an instrument number.
csoundDebuggerInit
PUBLIC void csoundDebuggerInit(CSOUND *csound)
Intialize debugger facilities.
csoundSetBreakpointCallback
PUBLIC void csoundSetBreakpointCallback(CSOUND *csound, breakpoint_cb_t bkpt_cb, void *userdata)
Sets the breakpoint callback function.
csoundCreate
PUBLIC CSOUND * csoundCreate(void *hostData)
Creates an instance of Csound.
csoundDestroy
PUBLIC void csoundDestroy(CSOUND *)
Destroys an instance of Csound.
csoundCompileOrc
PUBLIC int csoundCompileOrc(CSOUND *csound, const char *str)
Parse, and compile the given orchestra from an ASCII string, also evaluating any global space code (i...
csoundStart
PUBLIC int csoundStart(CSOUND *csound)
Prepares Csound for performance.