File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ class Debugger {
171
171
this .api = api ;
172
172
eval = new Eval (module , api , jit );
173
173
eval .resumeDebug = evalResumeDebug ;
174
+ eval .setSingleStep = singleStep ;
174
175
if ( ! api .start () )
175
176
return false ;
176
177
wait (); // wait first break
@@ -289,7 +290,7 @@ class Debugger {
289
290
while ( true ) {
290
291
cmd = api .wait (customTimeout == null ? 1000 : Math .ceil (customTimeout * 1000 ));
291
292
292
- if ( cmd .r == Breakpoint && (nextStep >= 0 || onStep ) ) {
293
+ if ( cmd .r == Breakpoint && ! onEvalCall && (nextStep >= 0 || onStep ) ) {
293
294
// On Linux, singlestep is not reset
294
295
cmd .r = SingleStep ;
295
296
singleStep (cmd .tid ,false );
Original file line number Diff line number Diff line change @@ -490,7 +490,12 @@ class Eval {
490
490
if ( ! api .write (eip , buffer , asmSize ) )
491
491
throw " assert" ;
492
492
api .flush (eip , asmSize );
493
+ var isSingleStep = (api .readRegister (currentThread , EFlags ).toInt () & 256 ) == 256 ;
494
+ if ( isSingleStep )
495
+ setSingleStep (currentThread , false );
493
496
resumeDebug ();
497
+ if ( isSingleStep )
498
+ setSingleStep (currentThread , true );
494
499
// restore
495
500
api .write (eip , prevAsm , asmSize );
496
501
api .flush (eip , asmSize );
@@ -509,6 +514,10 @@ class Eval {
509
514
throw " Not implemented" ;
510
515
}
511
516
517
+ public dynamic function setSingleStep (tid : Int , set : Bool ) {
518
+ throw " Not implemented" ;
519
+ }
520
+
512
521
function getNum ( v : Value ) : Float {
513
522
return switch ( v .v ) {
514
523
case VInt (i ): i ;
You can’t perform that action at this time.
0 commit comments