Skip to content

Commit

Permalink
Fix evalCall overwrite stack
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed Jun 13, 2024
1 parent cfb083c commit 878f0f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hld/Debugger.hx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class Debugger {

function evalResumeDebug() {
resume();
wait();
wait(false, true);
}

function close() {
Expand Down Expand Up @@ -282,7 +282,7 @@ class Debugger {
return fields;
}

function wait( onStep = false ) : Api.WaitResult {
function wait( onStep = false, onEvalCall = false ) : Api.WaitResult {
var cmd = null;
var condition : String = null;
watchBreak = null;
Expand Down Expand Up @@ -369,6 +369,10 @@ class Debugger {
}
stoppedThread = cmd.tid;

// Do not overwrite stack on evalCall
if( onEvalCall )
return cmd.r;

// in thread-disabled we don't know the main thread id in HL:
// first stop is on a special thread in windows
// wait for second stop with is user-specific
Expand Down

0 comments on commit 878f0f5

Please sign in to comment.