Skip to content

Commit

Permalink
Fix setbreakpoints on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed Apr 19, 2024
1 parent d3ddea1 commit 5f1c4e7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/HLAdapter.hx
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,12 @@ class HLAdapter extends DebugSession {
sendResponse(response);
return;
}
var forcePaused = false;
if( dbg.stoppedThread == null ) {
// On Linux, ptrace needs to be in ptrace-stop state in order to read/write
forcePaused = true;
safe(() -> dbg.pause());
}
for( f in files )
dbg.clearBreakpoints(f);
var bps = [];
Expand All @@ -511,6 +517,8 @@ class HLAdapter extends DebugSession {
else
bps.push({ line : bp.line, verified : false, message : "No code found here" });
}
if( forcePaused )
shouldRun = true;
sendResponse(response);
}

Expand Down

0 comments on commit 5f1c4e7

Please sign in to comment.