From a6f0ac0014b103bd2ffc02f39f3a43767ec58192 Mon Sep 17 00:00:00 2001 From: Andreas Hollandt Date: Fri, 6 Nov 2020 17:01:06 +0100 Subject: [PATCH] add comment about potential race condition --- src/MICore/CommandFactories/gdb.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MICore/CommandFactories/gdb.cs b/src/MICore/CommandFactories/gdb.cs index f65d9846f..5df01be1c 100644 --- a/src/MICore/CommandFactories/gdb.cs +++ b/src/MICore/CommandFactories/gdb.cs @@ -186,6 +186,9 @@ public override async Task> 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); }