comparison debug.h @ 2175:8c28c5466d70

Minor cleanup of debugger changes
author Michael Pavone <pavone@retrodev.com>
date Sat, 06 Aug 2022 22:10:42 -0700
parents f80c6111e1ae
children f6d5bde4d07f
comparison
equal deleted inserted replaced
2174:eff7bedfc838 2175:8c28c5466d70
21 char *commands; 21 char *commands;
22 uint32_t address; 22 uint32_t address;
23 uint32_t index; 23 uint32_t index;
24 } bp_def; 24 } bp_def;
25 25
26 typedef struct { 26 typedef struct debug_root debug_root;
27 typedef uint8_t (*resolver)(debug_root *root, const char *name, uint32_t *out);
28 typedef uint8_t (*reader)(debug_root *root, uint32_t *out, char size);
29
30 struct debug_root {
27 void *cpu_context; 31 void *cpu_context;
28 bp_def *breakpoints; 32 bp_def *breakpoints;
29 disp_def *displays; 33 disp_def *displays;
34 resolver resolve;
35 reader read_mem;
30 uint32_t bp_index; 36 uint32_t bp_index;
31 uint32_t disp_index; 37 uint32_t disp_index;
32 uint32_t branch_t; 38 uint32_t branch_t;
33 uint32_t branch_f; 39 uint32_t branch_f;
34 } debug_root; 40 uint32_t address;
41 };
35 42
36 debug_root *find_root(void *cpu); 43 debug_root *find_root(void *cpu);
37 bp_def ** find_breakpoint(bp_def ** cur, uint32_t address); 44 bp_def ** find_breakpoint(bp_def ** cur, uint32_t address);
38 bp_def ** find_breakpoint_idx(bp_def ** cur, uint32_t index); 45 bp_def ** find_breakpoint_idx(bp_def ** cur, uint32_t index);
39 void add_display(disp_def ** head, uint32_t *index, char format_char, char * param); 46 void add_display(disp_def ** head, uint32_t *index, char format_char, char * param);