Skip to content
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
44 changes: 44 additions & 0 deletions src/OpenDebugAD7/AD7DebugSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,35 @@ public AD7DebugSession(Stream debugAdapterStdIn, Stream debugAdapterStdOut, List
m_dataBreakpoints = new Dictionary<string, IDebugPendingBreakpoint2>();
m_exceptionBreakpoints = new List<string>();
m_variableManager = new VariableManager();

//Register sendInvalidate request
Protocol.RegisterRequestType<SendInvalidateRequest, SendInvalidateArguments>(r => this.HandleSendInvalidateRequestAsync(r));

}

private void HandleSendInvalidateRequestAsync(IRequestResponder<SendInvalidateArguments> responder)
{
InvalidatedEvent invalidated = new InvalidatedEvent();

// Setting the area and adding it to the result
invalidated.Areas.Add(responder.Arguments.Areas);

// Setting the StackFrameId if passed (and the 'threadId' is ignored).
if (null != responder.Arguments.StackFrameId)
{
invalidated.StackFrameId = responder.Arguments.StackFrameId;
}

// Setting the ThreadId if passed
else if (null != responder.Arguments.ThreadId)
{
invalidated.ThreadId = responder.Arguments.ThreadId;
}


Protocol.SendEvent(invalidated);

}
#endregion

#region Utility
Expand Down Expand Up @@ -3874,4 +3901,21 @@ int IDebugSettingsCallback110.ShouldSuppressImplicitToStringCalls(out int pfSupp
}
}
}

internal class SendInvalidateRequest : DebugRequest<SendInvalidateArguments>
{

public SendInvalidateRequest(): base("sendInvalidate")
{
}
}

internal class SendInvalidateArguments : DebugRequestArguments
{

public InvalidatedAreas Areas { get; set; }
public int? ThreadId { get; set; }
public int? StackFrameId { get; set; }

}
}