Skip to content

Commit

Permalink
add comment about potential race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Trass3r committed Nov 6, 2020
1 parent 936f730 commit e33dedb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/MICore/CommandFactories/gdb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ public override async Task<List<ulong>> StartAddressesForLine(string file, uint
private async Task JumpInternal(string target)
{
// temporary breakpoint + jump
// NB: the gdb docs state: "Resume execution at line linespec. Execution stops again immediately if there is a breakpoint there."
// We rely on this. If another thread hits a breakpoint before that we have a UX problem
// and would need to handle this via scheduler-locking for all-stop mode and ??? for non-stop mode.
await _debugger.CmdAsync("-break-insert -t " + target, ResultClass.done);
await _debugger.CmdAsync("-exec-jump " + target, ResultClass.running);
}
Expand Down

0 comments on commit e33dedb

Please sign in to comment.