diff 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
line wrap: on
line diff
--- a/debug.h	Sat Aug 06 15:35:10 2022 -0700
+++ b/debug.h	Sat Aug 06 22:10:42 2022 -0700
@@ -23,15 +23,22 @@
 	uint32_t      index;
 } bp_def;
 
-typedef struct {
+typedef struct debug_root debug_root;
+typedef uint8_t (*resolver)(debug_root *root, const char *name, uint32_t *out);
+typedef uint8_t (*reader)(debug_root *root, uint32_t *out, char size);
+
+struct debug_root {
 	void     *cpu_context;
 	bp_def   *breakpoints;
 	disp_def *displays;
+	resolver resolve;
+	reader   read_mem;
 	uint32_t bp_index;
 	uint32_t disp_index;
 	uint32_t branch_t;
 	uint32_t branch_f;
-} debug_root;
+	uint32_t address;
+};
 
 debug_root *find_root(void *cpu);
 bp_def ** find_breakpoint(bp_def ** cur, uint32_t address);