differentiate between typing/loading as variant of going

This commit is contained in:
Aaron Culliney 2014-03-30 13:58:34 -07:00
parent afcc95c2f4
commit 3005fcaa6e
3 changed files with 16 additions and 7 deletions

View File

@ -32,6 +32,7 @@ typedef enum {
FINISHING,
UNTILING,
TYPING,
LOADING,
GOING
} stepping_type_t;

View File

@ -819,21 +819,29 @@ ADDRS [0-9a-fA-F]+
}
LOG("Typing...");
int ch = -1;
while (fgets(buf, DEBUG_BUFSZ, fp)) {
LOG(buf);
stepping_struct_t s = {
.step_type = TYPING,
.step_type = LOADING,
.step_text = buf
};
int ch = debugger_go(s);
ch = debugger_go(s);
if (ch != -1) {
break;
}
}
fclose(fp);
if (ch == -1) {
stepping_struct_t s = {
.step_type = GOING,
};
debugger_go(s);
}
return LOAD;
}

View File

@ -1155,8 +1155,7 @@ static int begin_cpu_stepping() {
break;
}
#endif
if (idx > textlen) {
if ( (stepping_struct.step_type != TYPING) && (idx > textlen) ) {
break; // finished typing
}
if (stepping_timeout && (stepping_struct.timeout < time(NULL))) {
@ -1246,6 +1245,7 @@ bool c_debugger_should_break() {
case GOING:
case TYPING:
case LOADING:
break;
}
}
@ -1262,8 +1262,8 @@ int debugger_go(stepping_struct_t s) {
int ch = begin_cpu_stepping();
#if !defined(TESTING)
clear_debugger_screen();
if (stepping_struct.step_type != TYPING) {
if (stepping_struct.step_type != LOADING) {
clear_debugger_screen();
disasm(cpu65_current.pc, 1, 0, -1);
int branch = will_branch();
if (branch != BRANCH_NA) {