libc8
CHIP-8 utility library
debug.h
Go to the documentation of this file.
1
8
#ifndef LIBC8_DEBUG_H
9
#define LIBC8_DEBUG_H
10
11
#include "../chip8.h"
12
13
#define DEBUG_QUIT 1
14
#define DEBUG_CONTINUE 2
15
#define DEBUG_STEP 3
16
17
#define DEBUG_HELP_STRING "Available commands:\n\
18
break [ADDRESS]: Add breakpoint to PC or ADDRESS, if given\n\
19
rmbreak [ADDRESS]: Remove breakpoint at PC or ADDRESS, if given\n\
20
continue: Exit debug mode until next breakpoint or completion\n\
21
help: Print this help string\n\
22
load PATH: Load program state from PATH\n\
23
next: Step to the next instruction\n\
24
print [ATTRIBUTE]: Print current value of ATTRIBUTE\n\
25
save PATH: Save program state to the given file\n\
26
set ATTRIBUTE VALUE: Set the given attribute to the given value\n\
27
quit: Terminate the program\n\
28
\n\
29
Available attributes to print:\n\
30
PC: Program counter\n\
31
SP: Stack pointer\n\
32
DT: Delay timer\n\
33
ST: Sound timer\n\
34
I: I address\n\
35
K: Register to store next keypress\n\
36
V[x]: All register values or value of Vx, if given\n\
37
stack: All stack values\n\
38
$[address]: Value at given address\n\
39
\n\
40
If no argument is given to print, it will print all of the above attributes\n\
41
except for address values.\n"
42
43
44
int
debug_repl
(
c8_t
*);
45
int
has_breakpoint
(
c8_t
*, uint16_t);
46
47
#endif
debug_repl
int debug_repl(c8_t *)
Debug command line loop.
Definition:
debug.c:174
has_breakpoint
int has_breakpoint(c8_t *, uint16_t)
Check if breakpoint exists at address pc.
Definition:
debug.c:225
c8_t
Represents current state of the CHIP-8 interpreter.
Definition:
chip8.h:51
libc8
c8
private
debug.h
Generated by
1.9.4