From 97b44d777a6417cd4d7b49f3c4aa1585ee916976 Mon Sep 17 00:00:00 2001 From: Anton Burticica Date: Mon, 4 Dec 2023 19:56:27 +0200 Subject: [PATCH 1/3] Reverse sort sourceMap (#1428) Do reverse sort of the `sourceMap`. In my `launch.json` configuration I have the following `sourceFileMap`: ``` "sourceFileMap": { "/usr/src/debug/my-project/git-r0/build/src/../../git": "${workspaceFolder}", "/usr/src/debug": { "editorPath": "${config:YOCTO_ARCH}", "useForBreakpoints": false } }, ``` The YOCTO_ARCH set in `settings.json` to: ``` "terminal.integrated.env.linux": { "YOCTO_ARCH": "/home/mouse/linux-bsp/linux-devel-build/build/work/cortexa7t2hf-neon-vfpv4_linux-linux-gnueabi" }, ``` This PR addresses an issue encountered while debugging a binary that's running on a remote system and built using Yocto. Currently, when debugging, the source files are being referenced from the Yocto build tree instead of the local workspace. This issue prevents setting breakpoints effectively in the local workspace source files. To resolve this, the change involves modifying the way source mappings are processed. Specifically, it proposes sorting the mappings in reverse order, starting with the longer, more specific paths and moving towards the more general ones. By doing this, the debugger will first consider the project-specific paths defined in `sourceFileMap`. If it doesn't find a match there, it will then fall back to the more general paths. This reverse sorting ensures that the local workspace sources are prioritized over the Yocto build tree sources, allowing for effective breakpoint setting and debugging in the local workspace. --- src/MICore/LaunchOptions.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/MICore/LaunchOptions.cs b/src/MICore/LaunchOptions.cs index 7c102711f..95f1ee049 100644 --- a/src/MICore/LaunchOptions.cs +++ b/src/MICore/LaunchOptions.cs @@ -370,7 +370,7 @@ public static ReadOnlyCollection CreateCollection(Xml.LaunchOpti public static ReadOnlyCollection CreateCollection(Dictionary source) { - IList sourceMaps = new List(source.Keys.Count); + var sourceMaps = new List(source.Keys.Count); foreach (var item in source) { @@ -416,6 +416,11 @@ public static ReadOnlyCollection CreateCollection(Dictionary string.CompareOrdinal(y.CompileTimePath, x.CompileTimePath)); + return new ReadOnlyCollection(sourceMaps); } } From 2a0f9efa65869f9ae64f1f5782c50998d31baa22 Mon Sep 17 00:00:00 2001 From: nikitalita <69168929+nikitalita@users.noreply.github.com> Date: Thu, 21 Dec 2023 15:02:19 -0800 Subject: [PATCH 2/3] Fix missing s32 format specifier support (#1431) Fix s32 format specifier support --- src/MIDebugEngine/Engine.Impl/Variables.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MIDebugEngine/Engine.Impl/Variables.cs b/src/MIDebugEngine/Engine.Impl/Variables.cs index 32e6b78b7..8c297998f 100644 --- a/src/MIDebugEngine/Engine.Impl/Variables.cs +++ b/src/MIDebugEngine/Engine.Impl/Variables.cs @@ -425,6 +425,9 @@ private string ProcessFormatSpecifiers(string exp, out string formatSpecifier) case "su": case "sub": return "(const char16_t*)(" + exp.Substring(0, lastComma) + ")"; + case "s32": + case "s32b": + return "(const char32_t*)(" + exp.Substring(0, lastComma) + ")"; case "c": return "(char)(" + exp.Substring(0, lastComma) + ")"; // just remove and ignore these From 40175199ebe98db558c5fc609ffb85fec51bc9ce Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Tue, 2 Jan 2024 14:48:16 -0800 Subject: [PATCH 3/3] Theme Docker Container Selector Dialog (#1430) * Theme Docker Container Selector Dialog This PR updates the Docker Container Selector Dialog in Visual Studio to be themed. The following changes were done: - Updates VS packages since some of the newer theming was in newer packages. - Newer packages had new attributes that needed to be handled with MakePIAPortableTool. - Converted ListBox to ListView for ContainerPickerDialog and modified associated automation peers * Address PR issues * Revert to 17.5.33428.366 * Remove Maximize Functionality * Address title bar issues --- build/package_versions.settings.targets | 26 +- src/DebugEngineHost/DebugEngineHost.csproj | 2 - src/MIDebugPackage/MIDebugPackage.csproj | 2 - src/MakePIAPortable/MakePIAPortable.csproj | 14 +- src/SSHDebugPS/SSHDebugPS.csproj | 2 - .../UI/ContainerPickerDialogWindow.xaml | 350 ++++++++++-------- .../UI/ContainerPickerDialogWindow.xaml.cs | 27 +- .../ContainerListBoxItemAutomationPeer.cs | 4 +- ....cs => ContainerListViewAutomationPeer.cs} | 6 +- .../UI/Controls/ContainerListBox.cs | 4 +- .../Converters/BoolToVisibilityConverter.cs | 5 +- .../MakePIAPortableTool.cs | 5 +- 12 files changed, 247 insertions(+), 200 deletions(-) rename src/SSHDebugPS/UI/Controls/Automation/{ContainerListBoxAutomationPeer.cs => ContainerListViewAutomationPeer.cs} (61%) diff --git a/build/package_versions.settings.targets b/build/package_versions.settings.targets index c1eee41bb..470194d01 100644 --- a/build/package_versions.settings.targets +++ b/build/package_versions.settings.targets @@ -1,8 +1,8 @@ 1.0.1 - 17.0.0-previews-1-31410-258 - 13.0.1 + 17.8.37221 + 13.0.3 17.2.60629.1 @@ -19,20 +19,20 @@ 17.0.28-g439d20ddd3 17.0.1051901-preview - 17.0.0-previews-1-31410-258 - 17.0.0-previews-1-31410-258 - 17.0.0-previews-1-31410-258 - 17.0.0-previews-1-31410-258 - 17.0.0-previews-1-31410-258 - 17.0.0-previews-1-31410-258 - 17.0.0-previews-1-31410-258 - 17.0.0-previews-1-31410-258 - 17.0.17-alpha - 17.0.0-previews-1-31410-258 + 17.5.33428.388 + 17.5.33428.366 + 17.5.33428.366 + 17.5.33428.366 + 17.5.33428.366 + 17.5.33428.366 + 17.8.37221 + 17.8.37221 + 17.8.14 + 17.8.37221 15.0.26932 15.0.392 15.0.392 - 17.0.0-previews-1-31410-258 + 17.8.37221 17.3.2093 4.3.0 diff --git a/src/DebugEngineHost/DebugEngineHost.csproj b/src/DebugEngineHost/DebugEngineHost.csproj index 5a09a365d..03bd58c69 100755 --- a/src/DebugEngineHost/DebugEngineHost.csproj +++ b/src/DebugEngineHost/DebugEngineHost.csproj @@ -88,8 +88,6 @@ compile all - - diff --git a/src/MIDebugPackage/MIDebugPackage.csproj b/src/MIDebugPackage/MIDebugPackage.csproj index 67e436c68..fe7a3a4ad 100755 --- a/src/MIDebugPackage/MIDebugPackage.csproj +++ b/src/MIDebugPackage/MIDebugPackage.csproj @@ -38,8 +38,6 @@ - - compile all diff --git a/src/MakePIAPortable/MakePIAPortable.csproj b/src/MakePIAPortable/MakePIAPortable.csproj index 16fd00340..235f6baf0 100644 --- a/src/MakePIAPortable/MakePIAPortable.csproj +++ b/src/MakePIAPortable/MakePIAPortable.csproj @@ -41,13 +41,13 @@ - - - - - - - + + + + + + + diff --git a/src/SSHDebugPS/SSHDebugPS.csproj b/src/SSHDebugPS/SSHDebugPS.csproj index 677a34d63..f270e64e6 100644 --- a/src/SSHDebugPS/SSHDebugPS.csproj +++ b/src/SSHDebugPS/SSHDebugPS.csproj @@ -27,8 +27,6 @@ all - - diff --git a/src/SSHDebugPS/UI/ContainerPickerDialogWindow.xaml b/src/SSHDebugPS/UI/ContainerPickerDialogWindow.xaml index c765009f6..cfdc1e8d6 100644 --- a/src/SSHDebugPS/UI/ContainerPickerDialogWindow.xaml +++ b/src/SSHDebugPS/UI/ContainerPickerDialogWindow.xaml @@ -6,7 +6,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:platformui="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0" - xmlns:vsui="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell" + xmlns:vsui="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.15.0" xmlns:vsimaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging" xmlns:catalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog" xmlns:local="clr-namespace:Microsoft.SSHDebugPS" @@ -18,22 +18,116 @@ Height="600" ShowInTaskbar="False" Name="ContainerPickerDialog" + Background="{DynamicResource {x:Static platformui:ThemedDialogColors.WindowPanelBrushKey}}" + Foreground="{DynamicResource {x:Static platformui:ThemedDialogColors.WindowPanelTextBrushKey}}" FontFamily="{DynamicResource VsFont.EnvironmentFontFamily}" FontSize="{DynamicResource VsFont.EnvironmentFontSize}" Title="{x:Static local:UIResources.DialogTitle}" WindowStartupLocation="CenterOwner"> + + + + + + + + + + + + @@ -103,7 +198,7 @@ Value="Transparent" /> - - - @@ -278,6 +276,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +