diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2019-08-08 20:28:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-08 20:28:33 +0300 |
commit | 5d045c233907e34b1edddb100280ef21e1bc0eb3 (patch) | |
tree | 7cff1976810d2977152575c68769ab66923a27b8 /main | |
parent | 8aedb546df9f942e972d22b93d692fc3f87f8c7d (diff) | |
parent | 9662791c2c8f6c9923b4912d6dc63858cae6fe3d (diff) |
Merge pull request #8266 from mono/jstedfast-dotnetcore-src-hash-8.2
[8.2][Debugger] Fixed .NET Core debugger to allow use of SHA256 and MD5 h…
Diffstat (limited to 'main')
2 files changed, 14 insertions, 7 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/CustomSoftDebuggerEngine.cs b/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/CustomSoftDebuggerEngine.cs index 2e5e08f885..0ed6f75f22 100644 --- a/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/CustomSoftDebuggerEngine.cs +++ b/main/src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/CustomSoftDebuggerEngine.cs @@ -340,7 +340,7 @@ namespace MonoDevelop.Debugger.Soft TimeBetweenConnectionAttempts = 800, MaxConnectionAttempts = -1, }; - }; + } var dsi = new SoftDebuggerStartInfo (startArgs) { Command = StringParserService.Parse (command), diff --git a/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VsCodeStackFrame.cs b/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VsCodeStackFrame.cs index 09930da9ee..d4bcc54d57 100644 --- a/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VsCodeStackFrame.cs +++ b/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VsCodeStackFrame.cs @@ -58,7 +58,7 @@ namespace MonoDevelop.Debugger.VsCodeDebugProtocol this.frameId = frame.Id; } - static byte [] HexToByteArray (string hex) + static byte[] HexToByteArray (string hex) { if (hex.Length % 2 == 1) throw new ArgumentException (); @@ -69,14 +69,21 @@ namespace MonoDevelop.Debugger.VsCodeDebugProtocol return bytes; } - static byte [] GetHashBytes (Source source) + static byte[] GetHashBytes (Source source) { if (source == null) return null; - var checkSum = source.Checksums.FirstOrDefault (c => c.Algorithm == ChecksumAlgorithm.SHA1); - if (checkSum == null) - return null; - return HexToByteArray (checkSum.ChecksumValue); + + foreach (var checksum in source.Checksums) { + switch (checksum.Algorithm) { + case ChecksumAlgorithm.SHA256: + case ChecksumAlgorithm.SHA1: + case ChecksumAlgorithm.MD5: + return HexToByteArray (checksum.ChecksumValue); + } + } + + return null; } public override string FullStackframeText { |