Mercurial > repos > blastem
comparison debug.h @ 2361:3350b3c8faa8
Initial implementation of VDP register write breakpoints
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 30 Oct 2023 00:07:56 -0700 |
parents | 04d29635d238 |
children | b6c5a0fa3dfc |
comparison
equal
deleted
inserted
replaced
2360:053ba4551c62 | 2361:3350b3c8faa8 |
---|---|
96 int num_args; | 96 int num_args; |
97 command_block block; | 97 command_block block; |
98 command_block else_block; | 98 command_block else_block; |
99 }; | 99 }; |
100 | 100 |
101 enum { | |
102 BP_TYPE_CPU, | |
103 BP_TYPE_VDPREG, | |
104 BP_TYPE_VDPDMA, | |
105 BP_TYPE_VDPDATA | |
106 }; | |
107 | |
101 typedef struct bp_def { | 108 typedef struct bp_def { |
102 struct bp_def *next; | 109 struct bp_def *next; |
103 parsed_command *commands; | 110 parsed_command *commands; |
104 expr *condition; | 111 expr *condition; |
105 uint32_t num_commands; | 112 uint32_t num_commands; |
106 uint32_t address; | 113 uint32_t address; |
107 uint32_t index; | 114 uint32_t index; |
115 uint32_t mask; | |
116 uint8_t type; | |
108 } bp_def; | 117 } bp_def; |
109 | 118 |
110 typedef struct debug_array debug_array; | 119 typedef struct debug_array debug_array; |
111 typedef uint32_t (*debug_array_get)(debug_root *root, debug_array *array, uint32_t index); | 120 typedef uint32_t (*debug_array_get)(debug_root *root, debug_array *array, uint32_t index); |
112 typedef void (*debug_array_set)(debug_root *root, debug_array *array, uint32_t index, uint32_t value); | 121 typedef void (*debug_array_set)(debug_root *root, debug_array *array, uint32_t index, uint32_t value); |
152 }; | 161 }; |
153 | 162 |
154 debug_root *find_root(void *cpu); | 163 debug_root *find_root(void *cpu); |
155 debug_root *find_m68k_root(m68k_context *context); | 164 debug_root *find_m68k_root(m68k_context *context); |
156 debug_root *find_z80_root(z80_context *context); | 165 debug_root *find_z80_root(z80_context *context); |
157 bp_def ** find_breakpoint(bp_def ** cur, uint32_t address); | 166 bp_def ** find_breakpoint(bp_def ** cur, uint32_t address, uint8_t type); |
158 bp_def ** find_breakpoint_idx(bp_def ** cur, uint32_t index); | 167 bp_def ** find_breakpoint_idx(bp_def ** cur, uint32_t index); |
159 void add_display(disp_def ** head, uint32_t *index, char format_char, char * param); | 168 void add_display(disp_def ** head, uint32_t *index, char format_char, char * param); |
160 void remove_display(disp_def ** head, uint32_t index); | 169 void remove_display(disp_def ** head, uint32_t index); |
161 void debugger(m68k_context * context, uint32_t address); | 170 void debugger(m68k_context * context, uint32_t address); |
162 z80_context * zdebugger(z80_context * context, uint16_t address); | 171 z80_context * zdebugger(z80_context * context, uint16_t address); |