-
Notifications
You must be signed in to change notification settings - Fork 227
Merge 'main' into 'release-cpptools' #1535
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update Nuget Packages for Compliance
For other internal clients, it would be helpful if one could control the VSASSERT path, as this path is also used to write out where dump files are stored on Windows. This PR updates support to enable this.
The DebuggerTesting-release build was failing. This fixes it.
When parsing launch options from JSON, the JSON parser's default behavior is – for whatever reason – to parse slightly datetime-ish looking strings as date objects. This PR explicitly forbids this behavior when parsing launch options. Partially fixes #1491, microsoft/vscode-cpptools#13241 and microsoft/vscode#238514.
This PR updates the version of Microsoft.VisualStudio.Shared.VSCodeDebugProtocol to 17.14.10225.1. This completes the work for #1491. I also noticed the solution doesn't reference README.md, so this adds a link.
* Kill pipeTransport process on close * Remove blank line
VS Eng has requested that we update from v4 to v5.
…ktop v4.42.0 (#1505) * Add JsonIgnore attribute to Platform property to prevent deserialization Co-authored-by: WardenGnaw <3953714+WardenGnaw@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: WardenGnaw <3953714+WardenGnaw@users.noreply.github.com>
This PR also updates the PIA tool to handle AssemblyKeyFileAttribute and AssemblySignatureKeyAttribute
## Changes This PR contains two fixes to make MIEngine's build work better on my machine: 1. The incremental build rules were incorrect for MakePIAPortable, so it could run when it didn't need to, and it might not run when it was necessary. 2. On one of my machines, the sgen code didn't work anymore as it couldn't find csc.exe. This switches to using the `Csc` task instead. ## Testing - Verified MakePIAPortable doesn't run the `GeneratePortablePIA` target after touching dummy.cs - Verified MakePIAPortable runs the `GeneratePortablePIA` target after touching package_versions.settings.targets - Verified no IL differences in Microsoft.MICore.XmlSerializers.dll between the version currently shipping in VS and a locally compiled Lab.Release version - Verified no IL differences in Microsoft.MICore.XmlSerializers.dll between current main build and build with these changes
This PR removes the iOS MDD C++ Debugging support in MIEngine.
A number of fields in OpenFolderSchema.json were being localized that shouldn't have been. This fixes OpenFolderSchema.json.lci to hopefully fix this.
…20250904101035275 to main (#1516) Juno: check in to lego/hb_d72c5677-3f00-4225-b18e-0a1e8a8f5f0e_20250904101035275.
Update Release Pipelines
This PR checks in fixes from using lcxadmin.exe to further edit OpenFolderSchema.json.lci. This also deletes a .lsproj and .lcg file which were checked in, but I believe should not have been as these are generated from the build. Notes on how to do this in the future: 1. Add MicroBuild.Plugins.Localization to the local nuget cache. I was able to do so thusly: `nuget install MicroBuild.Plugins.Localization -Source "https://pkgs.dev.azure.com/devdiv/_packaging/MicroBuildToolset/nuget/v3/index.json" -Prerelease -OutputDirectory test`. After running this, you should be able to remove the `test` directory since the plugin should now be in your nuget cache. 2. Build the MIEngine solution 3. In `src\MIDebugPackage`, build using `msbuild /p:LocType=Pseudo /p:LocLanguages=VS /p:LSBuildVersion=V7 /p:LocalizationEnabled=true`. 4. Run `NugetPackages\microsoft.devdiv.localization.toolset\1.1.24090301\current\lcxadmin.exe MIEngine\bin\Debug\localize\ENU\OpenFolderSchema.json.lcg MIEngine\loc\lci\OpenFolderSchema.json.lci` to open the LCI editor, and configured strings. 5. If you made changes in step 4, repeat step 3 6. Use `"C:\Program Files\Git\usr\bin\diff.exe" d:\dd\MIEngine\bin\Debug\OpenFolderSchema.json d:\dd\MIEngine\bin\Debug\localize\CHS\OpenFolderSchema.json | findstr /v /c:"description"` to see if any non-description lines are being changed between ENU and the localized version.
…20250906094718381 to main (#1518) Juno: check in to lego/hb_d72c5677-3f00-4225-b18e-0a1e8a8f5f0e_20250906094718381.
The old format of (T[N])*((Ptr)+Offset) can generate invalid code, since casting a T& to a T[N] is not legal in C++. The new format instead casts the raw address to a pointer-to-array, and then dereferences it so that elements can be read later.
…l cast (#1520) Authored by: iridinite <codingcuddlewolf@gmail.com> PR: #1520 ### Overview The old format of `(T[N])*((Ptr)+Offset)` can generate invalid code. LLDB will pass the generated expression to a built-in Clang compiler that parses the expression as C++ code. * The second half of the expression (evaluated first) `Ptr+Offset` will generate a `T*` * The `T*` is then dereferenced with `*` to generate `T&` * Casting `T&` to `T[N]` is illegal The new format instead casts the raw address to a pointer-to-array, and then dereferences it so that elements can be read later. ### Min repro Code sample: ```c++ template<typename T> struct MyArray { int mLength; T* mBuffer; }; int main(int argc, char *argv[]) { MyArray<int> foo; foo.mBuffer = new int[3]; foo.mBuffer[0] = 123; foo.mBuffer[1] = 456; foo.mBuffer[2] = 789; foo.mLength = 3; __builtin_debugtrap(); } ``` Natvis: ```xml <Type Name="MyArray<*>"> <DisplayString>Length={mLength}</DisplayString> <Expand> <ArrayItems> <Size>mLength</Size> <ValuePointer>mBuffer</ValuePointer> </ArrayItems> </Expand> </Type> ```
Consider the following example code:
```c++
int main(int argc, char *argv[])
{
struct Foo
{
union
{
int a;
float b;
};
};
Foo f;
f.b = 1.0f;
__builtin_debugtrap();
}
```
When breaking at the debug trap, the following MI sequence is exchanged when using LLDB-MI (reformatted for readability):
```
1022-var-create - - "f" --thread 1 --frame 0
1022^done,name="var2",numchild="1",value="{...}",type="Foo",thread-id="1",has_more="0"
1025-var-list-children --all-values "var2" 0 1000
1025^done,numchild="1",children=[
child={name="var2.$0",exp="",numchild="2",type="Foo::(anonymous union)",thread-id="1",value="{...}",has_more="0"}
],has_more="0"
1027-var-list-children --all-values "var2.$0" 0 1000
1027^done,numchild="2",children=[
child={name="var2.$0.a",exp="a",numchild="0",type="int",thread-id="1",value="1065353216",has_more="0"},
child={name="var2.$0.b",exp="b",numchild="0",type="float",thread-id="1",value="1",has_more="0"}
],has_more="0"
```
The anonymous union in `Foo` is listed by LLDB-MI as an unnamed child (no expression) and with type name `Foo::(anonymous union)`. The current check for anonymous unions only accounts for the syntax flavor that GDB uses, and so when using LLDB, anonymous unions incorrectly get flagged as `NodeType.Field` by MIEngine. This in turn affects `FullName()` which will return an incorrect expression if the members of the union are also compounds.
This change ensures that the LLDB flavor of anonymous unions get flagged properly.
This would result in array elements in Natvis using incorrect expressions, e.g. the first array element would use the literal '[0]' as expression instead of the actual element path, which does not work. Co-authored-by: Gregg Miskelly <greggm@microsoft.com>
Update `areaPath` so that Code Analysis builds succeed.
Unlike GDB, LLDB-MI has a different result format for var-set-format. It wraps the new value in an array which only ever has one element. This PR adds support for either.
These three cases were not recognized by the format specifier parser: - The nvo, na, nr and nd specifiers may appear together with another specifier, e.g. 'nvoXb' is a valid format specifier. - Arrays with static size specifiers may contain additional format specifiers, e.g. 'ptr,[10]s8' is a valid expression. - Arrays with dynamic size specifiers may contain full C++ expressions in them, e.g. 'ptr,[mLength-mFree]' is valid. Without this change, the full expression e.g. '(foo).bar,nvoXb' would be passed to LLDB, which obviously yields a compilation error. Neither of these two cases can be implemented easily with the tools we currently have available, but by ensuring we at least recognize and strip such format specifiers, Natvis does not break completely.
…t off at ~2KB, causing debugger launch failures. (#1529) Fixes microsoft/vscode-cpptools#14054 Increased [PipeTransport](cci:2://file:///Users/subhamsangwan/vscode-cpptools/MIEngine_Debug/src/MICore/Transports/PipeTransport.cs:17:4-402:5) buffer size to **64KB** (from 1KB/2KB) to prevent long `launch.json` arguments from being truncated with lldb-mi.
The area path was changed again, so this updates `areaPath` again so that Code Analysis builds succeed.
When a map has enum as keys and any type of struct as values, the enum value that was used for the key would be replaced as if it was base class. As the VariableInformation class has a constructor that receives the names directly from the map, use that information to not allow the name override.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.