config.useDebugger

This commit is contained in:
Gwenhael Le Moine 2024-04-25 14:17:12 +02:00
parent 247d0cc133
commit c1ac07d513
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -131,11 +131,9 @@ int main( int argc, char** argv )
do { do {
step_instruction(); step_instruction();
if ( exec_flags & EXEC_BKPT ) { if ( ( config.useDebugger ) && ( exec_flags & EXEC_BKPT ) && ( check_breakpoint( BP_EXEC, saturn.PC ) ) ) {
if ( check_breakpoint( BP_EXEC, saturn.PC ) ) { enter_debugger |= BREAKPOINT_HIT;
enter_debugger |= BREAKPOINT_HIT; break;
break;
}
} }
for ( int i = 0; i < ( int )( sizeof( saturn.keybuf.rows ) / sizeof( saturn.keybuf.rows[ 0 ] ) ); i++ ) { for ( int i = 0; i < ( int )( sizeof( saturn.keybuf.rows ) / sizeof( saturn.keybuf.rows[ 0 ] ) ); i++ ) {
@ -160,8 +158,6 @@ int main( int argc, char** argv )
schedule(); schedule();
} while ( !please_exit && !enter_debugger ); } while ( !please_exit && !enter_debugger );
fprintf( stderr, "please_exit = %i, enter_debugger = %i\n", please_exit, enter_debugger );
if ( enter_debugger ) if ( enter_debugger )
debug(); debug();
} while ( !please_exit ); } while ( !please_exit );