Skip to content

Update to mono sources http://github.com/mono/mono/commit/57dcba253 #21700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,31 @@ protected override async Task<bool> AcceptCommand (MessageId id, string method,
var bpid = resp.Value["breakpointId"]?.ToString ();
var locations = resp.Value["locations"]?.Values<object>();
var request = BreakpointRequest.Parse (bpid, args);
context.BreakpointRequests[bpid] = request;

// is the store done loading?
var loaded = context.Source.Task.IsCompleted;
if (!loaded) {
// Send and empty response immediately if not
// and register the breakpoint for resolution
context.BreakpointRequests [bpid] = request;
SendResponse (id, resp, token);
}

if (await IsRuntimeAlreadyReadyAlready (id, token)) {
var store = await RuntimeReady (id, token);

Log ("verbose", $"BP req {args}");
await SetBreakpoint (id, store, request, token);
await SetBreakpoint (id, store, request, !loaded, token);
}

var result = Result.OkFromObject (request.AsSetBreakpointByUrlResponse (locations));
SendResponse (id, result, token);
if (loaded) {
// we were already loaded so we should send a response
// with the locations included and register the request
context.BreakpointRequests [bpid] = request;
var result = Result.OkFromObject (request.AsSetBreakpointByUrlResponse (locations));
SendResponse (id, result, token);

}
return true;
}

Expand Down Expand Up @@ -709,7 +724,7 @@ async Task<DebugStore> LoadStore (SessionId sessionId, CancellationToken token)

foreach (var req in context.BreakpointRequests.Values) {
if (req.TryResolve (source)) {
await SetBreakpoint (sessionId, context.store, req, token);
await SetBreakpoint (sessionId, context.store, req, true, token);
}
}
}
Expand Down Expand Up @@ -759,7 +774,7 @@ async Task RemoveBreakpoint(MessageId msg_id, JObject args, CancellationToken to
breakpointRequest.Locations.Clear ();
}

async Task SetBreakpoint (SessionId sessionId, DebugStore store, BreakpointRequest req, CancellationToken token)
async Task SetBreakpoint (SessionId sessionId, DebugStore store, BreakpointRequest req, bool sendResolvedEvent, CancellationToken token)
{
var context = GetContext (sessionId);
if (req.Locations.Any ()) {
Expand Down Expand Up @@ -796,7 +811,8 @@ async Task SetBreakpoint (SessionId sessionId, DebugStore store, BreakpointReque
location = loc.AsLocation ()
};

SendEvent (sessionId, "Debugger.breakpointResolved", JObject.FromObject (resolvedLocation), token);
if (sendResolvedEvent)
SendEvent (sessionId, "Debugger.breakpointResolved", JObject.FromObject (resolvedLocation), token);
}

req.Locations.AddRange (breakpoints);
Expand Down