Skip to content

Commit 05746d6

Browse files
committed
parent 603fa9c
author Sergey <sergey.bobko@intel.com> 1667223527 -0700 committer Sergey Bobko <sergey.bobko@intel.com> 1680535841 +0000 Add "sendInvalidate" request
1 parent 603fa9c commit 05746d6

4 files changed

Lines changed: 94 additions & 21 deletions

File tree

.github/workflows/Build-And-Test.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v3
2626
with:
2727
fetch-depth: 0
2828

2929
- name: Install .NET Core
30-
uses: actions/setup-dotnet@v1
30+
uses: actions/setup-dotnet@v3
3131
with:
3232
dotnet-version: 6.0.x
3333

3434
- name: Setup MSBuild.exe
35-
uses: microsoft/setup-msbuild@v1.0.2
35+
uses: microsoft/setup-msbuild@v1.1
3636

3737
- name: Setup NuGet.exe for use with actions
38-
uses: NuGet/setup-nuget@v1.0.5
38+
uses: NuGet/setup-nuget@v1
3939

4040
- name: Build MIDebugEngine
4141
run: |
@@ -44,7 +44,7 @@ jobs:
4444
Configuration: ${{ matrix.configuration }}
4545

4646
- name: Setup VSTest.console.exe
47-
uses: darenm/Setup-VSTest@v1
47+
uses: darenm/Setup-VSTest@v1.2
4848

4949
- name: Run VS Extension tests
5050
run: vstest.console.exe ${{ github.workspace }}\bin\${{ matrix.configuration }}\MICoreUnitTests.dll ${{ github.workspace }}\bin\${{ matrix.configuration }}\JDbgUnitTests.dll ${{ github.workspace }}\bin\${{ matrix.configuration }}\SSHDebugTests.dll ${{ github.workspace }}\bin\${{ matrix.configuration }}\MIDebugEngineUnitTests.dll
@@ -54,20 +54,20 @@ jobs:
5454

5555
steps:
5656
- name: Checkout
57-
uses: actions/checkout@v2
57+
uses: actions/checkout@v3
5858
with:
5959
fetch-depth: 0
6060

6161
- name: Install .NET Core
62-
uses: actions/setup-dotnet@v1
62+
uses: actions/setup-dotnet@v3
6363
with:
6464
dotnet-version: 6.0.x
6565

6666
- name: Setup MSBuild.exe
67-
uses: microsoft/setup-msbuild@v1.0.2
67+
uses: microsoft/setup-msbuild@v1.1
6868

6969
- name: Setup NuGet.exe for use with actions
70-
uses: NuGet/setup-nuget@v1.0.5
70+
uses: NuGet/setup-nuget@v1
7171

7272
- name: Build MIDebugEngine
7373
run: |
@@ -102,7 +102,7 @@ jobs:
102102
dotnet test $CppTestsPath --logger "trx;LogFileName=$ResultsPath"
103103
104104
- name: 'Upload Test Results'
105-
uses: actions/upload-artifact@v2
105+
uses: actions/upload-artifact@v3
106106
if: ${{ always() }}
107107
with:
108108
name: win_msys2_x64_results
@@ -112,12 +112,12 @@ jobs:
112112
runs-on: ubuntu-latest
113113
steps:
114114
- name: Checkout
115-
uses: actions/checkout@v2
115+
uses: actions/checkout@v3
116116
with:
117117
fetch-depth: 0
118118

119119
- name: Install .NET Core
120-
uses: actions/setup-dotnet@v1
120+
uses: actions/setup-dotnet@v3
121121
with:
122122
dotnet-version: 6.0.x
123123

@@ -143,7 +143,7 @@ jobs:
143143
${{ github.workspace }}/eng/Scripts/CI-Test.sh
144144
145145
- name: 'Upload Test Results'
146-
uses: actions/upload-artifact@v2
146+
uses: actions/upload-artifact@v3
147147
if: ${{ always() }}
148148
with:
149149
name: linux_x64_results
@@ -153,12 +153,12 @@ jobs:
153153
runs-on: macos-latest
154154
steps:
155155
- name: Checkout
156-
uses: actions/checkout@v2
156+
uses: actions/checkout@v3
157157
with:
158158
fetch-depth: 0
159159

160160
- name: Install .NET Core
161-
uses: actions/setup-dotnet@v1
161+
uses: actions/setup-dotnet@v3
162162
with:
163163
dotnet-version: 6.0.x
164164

@@ -172,7 +172,7 @@ jobs:
172172
${{ github.workspace }}/eng/Scripts/CI-Test.sh
173173
174174
- name: 'Upload Test Results'
175-
uses: actions/upload-artifact@v2
175+
uses: actions/upload-artifact@v3
176176
if: ${{ always() }}
177177
with:
178178
name: osx_x64_results

src/MICore/JsonLaunchOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public abstract partial class BaseOptions
5454
/// <summary>
5555
/// Indicates the console debugger that the MIDebugEngine will connect to. Allowed values are "gdb" "lldb".
5656
/// </summary>
57-
[JsonProperty("MIMode", DefaultValueHandling = DefaultValueHandling.Ignore)]
57+
[JsonProperty(nameof(MIMode), DefaultValueHandling = DefaultValueHandling.Ignore)]
5858
public string MIMode { get; set; }
5959

6060
/// <summary>

src/OpenDebugAD7/AD7DebugSession.cs

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,54 @@ public AD7DebugSession(Stream debugAdapterStdIn, Stream debugAdapterStdOut, List
128128
m_dataBreakpoints = new Dictionary<string, IDebugPendingBreakpoint2>();
129129
m_exceptionBreakpoints = new List<string>();
130130
m_variableManager = new VariableManager();
131+
132+
//Register sendInvalidate request
133+
Protocol.RegisterRequestType<SendInvalidateRequest, SendInvalidateArguments, SendInvalidateResponse>(r => this.HandleSendInvalidateRequestAsync(r));
134+
131135
}
132136

137+
private void HandleSendInvalidateRequestAsync(IRequestResponder<SendInvalidateArguments> responder)
138+
{
139+
InvalidatedEvent invalidated = new InvalidatedEvent();
140+
SendInvalidateResponse response = new SendInvalidateResponse();
141+
142+
// Setting the area and adding it to the result
143+
switch (responder.Arguments.Areas.ToString())
144+
{
145+
case "Threads":
146+
invalidated.Areas.Add(InvalidatedAreas.Threads);
147+
break;
148+
case "Stacks":
149+
invalidated.Areas.Add(InvalidatedAreas.Stacks);
150+
break;
151+
case "Variables":
152+
invalidated.Areas.Add(InvalidatedAreas.Variables);
153+
break;
154+
case "Unknown":
155+
invalidated.Areas.Add(InvalidatedAreas.Unknown);
156+
break;
157+
default:
158+
invalidated.Areas.Add(InvalidatedAreas.All);
159+
break;
160+
}
161+
162+
// Setting the StackFrameId if passed (and the 'threadId' is ignored).
163+
if (null != responder.Arguments.StackFrameId)
164+
{
165+
invalidated.StackFrameId = responder.Arguments.StackFrameId;
166+
}
167+
168+
// Setting the ThreadId if passed
169+
else if (null != responder.Arguments.ThreadId)
170+
{
171+
invalidated.ThreadId = responder.Arguments.ThreadId;
172+
}
173+
174+
175+
Protocol.SendEvent(invalidated);
176+
response.body.result = JsonConvert.SerializeObject(responder);
177+
responder.SetResponse(response);
178+
}
133179
#endregion
134180

135181
#region Utility
@@ -3874,4 +3920,31 @@ int IDebugSettingsCallback110.ShouldSuppressImplicitToStringCalls(out int pfSupp
38743920
}
38753921
}
38763922
}
3923+
3924+
internal class SendInvalidateRequest : DebugRequestWithResponse<SendInvalidateArguments, SendInvalidateResponse>
3925+
{
3926+
3927+
public SendInvalidateRequest(): base("sendInvalidate")
3928+
{
3929+
}
3930+
}
3931+
3932+
internal class SendInvalidateResponse : ResponseBody
3933+
{
3934+
public sealed class Body
3935+
{
3936+
public string result;
3937+
}
3938+
3939+
public Body body = new Body();
3940+
}
3941+
3942+
internal class SendInvalidateArguments : DebugRequestArguments
3943+
{
3944+
3945+
public string Areas { get; set; }
3946+
public int? ThreadId { get; set; }
3947+
public int? StackFrameId { get; set; }
3948+
3949+
}
38773950
}

src/SSHDebugPS/Docker/DockerContainerInstance.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ private DockerContainerInstance() { }
4747
[JsonProperty("Names")]
4848
public override string Name { get; set; }
4949

50-
[JsonProperty("Image")]
50+
[JsonProperty(nameof(Image))]
5151
public string Image { get; private set; }
5252

53-
[JsonProperty("Ports")]
53+
[JsonProperty(nameof(Ports))]
5454
public string Ports { get; set; }
5555

56-
[JsonProperty("Command")]
56+
[JsonProperty(nameof(Command))]
5757
public string Command { get; private set; }
5858

59-
[JsonProperty("Status")]
59+
[JsonProperty(nameof(Status))]
6060
public string Status { get; private set; }
6161

6262
[JsonProperty("CreatedAt")]

0 commit comments

Comments
 (0)