comparison 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
comparison
equal deleted inserted replaced
2178:f6d5bde4d07f 2179:9a8dd4ba2753
1302 fprintf(stderr, "Failed to write to address %X\n", address); 1302 fprintf(stderr, "Failed to write to address %X\n", address);
1303 } 1303 }
1304 return 1; 1304 return 1;
1305 } 1305 }
1306 1306
1307 static uint8_t cmd_frames(debug_root *root, char *format, int num_args, command_arg *args)
1308 {
1309 current_system->enter_debugger_frames = args[0].value;
1310 return 0;
1311 }
1312
1307 static uint8_t cmd_delete_m68k(debug_root *root, char *format, int num_args, command_arg *args) 1313 static uint8_t cmd_delete_m68k(debug_root *root, char *format, int num_args, command_arg *args)
1308 { 1314 {
1309 bp_def **this_bp = find_breakpoint_idx(&root->breakpoints, args[0].value); 1315 bp_def **this_bp = find_breakpoint_idx(&root->breakpoints, args[0].value);
1310 if (!*this_bp) { 1316 if (!*this_bp) {
1311 fprintf(stderr, "Breakpoint %d does not exist\n", args[0].value); 1317 fprintf(stderr, "Breakpoint %d does not exist\n", args[0].value);
1681 .desc = "Set a register, symbol or memory location to the result of evaluating VALUE", 1687 .desc = "Set a register, symbol or memory location to the result of evaluating VALUE",
1682 .impl = cmd_set, 1688 .impl = cmd_set,
1683 .min_args = 2, 1689 .min_args = 2,
1684 .max_args = 2, 1690 .max_args = 2,
1685 .skip_eval = 1 1691 .skip_eval = 1
1692 },
1693 {
1694 .names = (const char *[]){
1695 "frames", NULL
1696 },
1697 .usage = "frames EXPRESSION",
1698 .desc = "Resume execution for EXPRESSION video frames",
1699 .impl = cmd_frames,
1700 .min_args = 1,
1701 .max_args = 1
1686 } 1702 }
1687 }; 1703 };
1688 #define NUM_COMMON (sizeof(common_commands)/sizeof(*common_commands)) 1704 #define NUM_COMMON (sizeof(common_commands)/sizeof(*common_commands))
1689 1705
1690 command_def m68k_commands[] = { 1706 command_def m68k_commands[] = {