diff debug.c @ 2179:9a8dd4ba2753

Implement frame advance debugger command
author Michael Pavone <pavone@retrodev.com>
date Sat, 13 Aug 2022 19:37:17 -0700
parents f6d5bde4d07f
children b87658ba3b94
line wrap: on
line diff
--- a/debug.c	Sat Aug 13 19:16:30 2022 -0700
+++ b/debug.c	Sat Aug 13 19:37:17 2022 -0700
@@ -1304,6 +1304,12 @@
 	return 1;
 }
 
+static uint8_t cmd_frames(debug_root *root, char *format, int num_args, command_arg *args)
+{
+	current_system->enter_debugger_frames = args[0].value;
+	return 0;
+}
+
 static uint8_t cmd_delete_m68k(debug_root *root, char *format, int num_args, command_arg *args)
 {
 	bp_def **this_bp = find_breakpoint_idx(&root->breakpoints, args[0].value);
@@ -1683,6 +1689,16 @@
 		.min_args = 2,
 		.max_args = 2,
 		.skip_eval = 1
+	},
+	{
+		.names = (const char *[]){
+			"frames", NULL
+		},
+		.usage = "frames EXPRESSION",
+		.desc = "Resume execution for EXPRESSION video frames",
+		.impl = cmd_frames,
+		.min_args = 1,
+		.max_args = 1
 	}
 };
 #define NUM_COMMON (sizeof(common_commands)/sizeof(*common_commands))