|
BB2 C port
API reference: Blitz libraries in C and the shared code
|
#include "blitzlib.h"Data Structures |
Macros | |
| #define | TOK_docall 0xd509 |
| #define | DC_ADDTRACE 255 |
| #define | DC_DELTRACE 254 |
| #define | DC_VARWINDOW 253 |
| #define | DC_DISWINDOW 252 |
| #define | DC_COPPERLIST 251 |
| #define | DC_PROCCONTROL 250 |
| #define | DC_MEMWINDOWMOVE 249 |
Functions | |
| void | _dummybranch (void) |
| _dummybranch: the routine of every command, init and finit: RTS. | |
| void | _addvartracechk (void) |
| void | _delvartracechk (void) |
| void | _vartracewindowchk (void) |
| void | _disasmchk (void) |
| void | _coptracechk (void) |
| void | _coptracechk2 (void) |
| void | _procstatus (void) |
| void | _procstatus2 (void) |
| void | _memadrchk (void) |
| static void | send (void) |
| static UBYTE * | copyname (UBYTE *d, const UBYTE *s) |
| static void | addvartrace_c (ULONG var, const UBYTE *name, UWORD out, const UWORD *types) |
| AddVarTrace variable,string$,output (check): add a variable trace. | |
| static void | delvartrace_c (const UBYTE *name) |
| DelVarTrace variable$ (check): remove a trace on a named variable. | |
| static void | vartracewindow_c (void) |
| VarTraceWindow (check): open the variable trace window on the debugger screen (_varwindow, 253; data1 = $FF). | |
| static void | disasm_c (const UWORD *pc) |
| DisAsmWindow (check): open the disassembly window at this instruction. | |
| static void | coptrace_c (ULONG adr) |
| CopperTrace address (check): open the copper window at address. | |
| static void | coptrace2_c (const UBYTE *adr, UWORD off) |
| CopperTrace address,offset (check): the copper list whose address is at address+offset (a CopList object). | |
| static void | procstatus_c (UBYTE on, UBYTE explicit) |
| static void | procstatus0_c (void) |
| ProcControl (check): toggle the procedure checking (_proccontrol, 250, data1 = data2 = 0). | |
| static void | procstatus2_c (UWORD on) |
| ProcControl On|Off (check): set the procedure checking (_proccontrol, data1 = the byte, data2 = $FF). | |
| static void | memadr_c (UWORD num, ULONG adr) |
| MemoryWindow num#,address (check): open a memory window on the debugger screen (_memwindowmove, 249). | |
| BLITZ_ERRCHK_ASM (disasmchk, " .globl __disasmchk\n" "__disasmchk:\n" " movem.l d0-d1/a0-a1,-(sp)\n" " move.l 16(sp),a0\n" " jsr _disasm_c\n" " movem.l (sp)+,d0-d1/a0-a1\n" " rts") | |
Variables | |
| static struct dmessage | mess1 |
| static const UBYTE | converttype [8] = { 0, 1, 2, 3, 5, 6, 0, 4 } |
| #define DC_ADDTRACE 255 |
| #define DC_COPPERLIST 251 |
| #define DC_DELTRACE 254 |
| #define DC_DISWINDOW 252 |
| #define DC_MEMWINDOWMOVE 249 |
| #define DC_PROCCONTROL 250 |
| #define DC_VARWINDOW 253 |
| #define TOK_docall 0xd509 |
| void _addvartracechk | ( | void | ) |
| void _coptracechk | ( | void | ) |
| void _coptracechk2 | ( | void | ) |
| void _delvartracechk | ( | void | ) |
| void _disasmchk | ( | void | ) |
| void _dummybranch | ( | void | ) |
_dummybranch: the routine of every command, init and finit: RTS.
The commands act only in their error check routines (below), i.e. only when the program is compiled with the debugger.
| void _memadrchk | ( | void | ) |
| void _procstatus | ( | void | ) |
| void _procstatus2 | ( | void | ) |
| void _vartracewindowchk | ( | void | ) |
|
static |
AddVarTrace variable,string$,output (check): add a variable trace.
Sends _addtrace (255): data1 = the debugger type of the variable (converttype; 0 becomes 1), data2 = output (0 becomes 1), pad = 255, size = the variable's address, then the name. BUG(orig) (#609): the type indexes the 8 byte table unchecked. Fixed (#612): an empty name sends just its 0 (the original copied on to the next 0); fixed (#613): the name is cut to the 252 characters of mess1 with its 0.
| BLITZ_ERRCHK_ASM | ( | disasmchk | , |
| " .globl __disasmchk\n" "__disasmchk:\n" " movem.l d0-d1/a0- | a1, | ||
| - | sp)\n" " move.l 16(sp, | ||
| a0\n" " jsr _disasm_c\n" " movem.l(sp)+ | , | ||
| d0-d1/a0-a1\n" " rts" | ) |
|
static |
CopperTrace address,offset (check): the copper list whose address is at address+offset (a CopList object).
Nothing if address or the long read there is 0.
| adr | d0: the object's address |
| off | d1: the offset (word) of the copper list pointer |
|
static |
CopperTrace address (check): open the copper window at address.
Sends _copperlist (251) with size = address; nothing if address is 0.
| adr | d0: the copper list address |
|
static |
|
static |
DelVarTrace variable$ (check): remove a trace on a named variable.
Sends _deltrace (254) with the name at +8. Fixed (#610): the original wrote the name at +12 (+8..+11 kept the previous message's bytes, which the debugger read as the start of the name); the name copy as in AddVarTrace (fixed (#612, #613)).
| name | d0: the variable's name |
|
static |
DisAsmWindow (check): open the disassembly window at this instruction.
Searches back from the return address for the TRAP #1 ($4E41) the debugger's code has in front of the call and sends _diswindow (252) with data1/data2/pad = $FF and size = its address. BUG(orig) (#611): the search has no limit.
| pc | a0: the return address into the program (from the assembler thunk __disasmchk) |
|
static |
MemoryWindow num#,address (check): open a memory window on the debugger screen (_memwindowmove, 249).
| num | d0: the window number (data1, a byte) |
| adr | d1: the address (size) |
|
static |
ProcControl (check): toggle the procedure checking (_proccontrol, 250, data1 = data2 = 0).
|
static |
ProcControl On|Off (check): set the procedure checking (_proccontrol, data1 = the byte, data2 = $FF).
| on | d0: On/Off (the low byte) |
|
static |
|
static |
|
static |
VarTraceWindow (check): open the variable trace window on the debugger screen (_varwindow, 253; data1 = $FF).
|
static |
|
static |