comparison debug.c @ 2676:7e86ec94c899

Implement breakpoints in new 68K core
author Michael Pavone <pavone@retrodev.com>
date Sat, 15 Mar 2025 23:15:05 -0700
parents 54ac5fe14cf9
children c4256ce2c45a
comparison
equal deleted inserted replaced
2675:dbff641a33df 2676:7e86ec94c899
5557 return context; 5557 return context;
5558 } 5558 }
5559 5559
5560 #endif 5560 #endif
5561 5561
5562 void debugger(m68k_context * context, uint32_t address) 5562 void debugger(void *vcontext, uint32_t address)
5563 { 5563 {
5564 static char last_cmd[1024]; 5564 static char last_cmd[1024];
5565 char input_buf[1024]; 5565 char input_buf[1024];
5566 m68kinst inst; 5566 m68kinst inst;
5567 m68k_context *context = vcontext;
5567 5568
5568 init_terminal(); 5569 init_terminal();
5569 5570
5570 #ifndef NEW_CORE 5571 #ifndef NEW_CORE
5571 context->opts->sync_components(context, 0); 5572 context->opts->sync_components(context, 0);
5654 } 5655 }
5655 if (context->system == current_system) { 5656 if (context->system == current_system) {
5656 genesis_context *gen = context->system; 5657 genesis_context *gen = context->system;
5657 vdp_force_update_framebuffer(gen->vdp); 5658 vdp_force_update_framebuffer(gen->vdp);
5658 } 5659 }
5659 #ifndef NEW_CORE
5660 uint32_t after = m68k_decode(m68k_instruction_fetch, context, &inst, address); 5660 uint32_t after = m68k_decode(m68k_instruction_fetch, context, &inst, address);
5661 root->after = after; 5661 root->after = after;
5662 root->inst = &inst; 5662 root->inst = &inst;
5663 #endif
5664 for (disp_def * cur = root->displays; cur; cur = cur->next) { 5663 for (disp_def * cur = root->displays; cur; cur = cur->next) {
5665 char format_str[8]; 5664 char format_str[8];
5666 make_format_str(format_str, cur->format); 5665 make_format_str(format_str, cur->format);
5667 for (int i = 0; i < cur->num_args; i++) 5666 for (int i = 0; i < cur->num_args; i++)
5668 { 5667 {