comparison debug.c @ 1329:85a90964b557

Fix interaction between 68K debugger and instruction retranslation due to self modifying code or bank switching
author Michael Pavone <pavone@retrodev.com>
date Mon, 24 Apr 2017 20:49:31 -0700
parents ae932ca28282
children 4f96103b4b47
comparison
equal deleted inserted replaced
1328:70faad89d491 1329:85a90964b557
883 } 883 }
884 return 1; 884 return 1;
885 } 885 }
886 886
887 887
888 m68k_context * debugger(m68k_context * context, uint32_t address) 888 void debugger(m68k_context * context, uint32_t address)
889 { 889 {
890 static char last_cmd[1024]; 890 static char last_cmd[1024];
891 char input_buf[1024]; 891 char input_buf[1024];
892 m68kinst inst; 892 m68kinst inst;
893 893
936 free(copy); 936 free(copy);
937 } 937 }
938 if (debugging) { 938 if (debugging) {
939 printf("68K Breakpoint %d hit\n", (*this_bp)->index); 939 printf("68K Breakpoint %d hit\n", (*this_bp)->index);
940 } else { 940 } else {
941 return context; 941 return;
942 } 942 }
943 } else { 943 } else {
944 remove_breakpoint(context, address); 944 remove_breakpoint(context, address);
945 } 945 }
946 for (disp_def * cur = displays; cur; cur = cur->next) { 946 for (disp_def * cur = displays; cur; cur = cur->next) {
984 } else { 984 } else {
985 strcpy(input_buf, last_cmd); 985 strcpy(input_buf, last_cmd);
986 } 986 }
987 debugging = run_debugger_command(context, input_buf, inst, after); 987 debugging = run_debugger_command(context, input_buf, inst, after);
988 } 988 }
989 return context; 989 return;
990 } 990 }