diff options
author | Alex Budovski <alexbud@meta.com> | 2023-03-21 13:09:41 (GMT) |
---|---|---|
committer | Alex Budovski <alexbud@meta.com> | 2023-03-24 15:17:09 (GMT) |
commit | a32d9207c46fbe02ef60473598325e3b50aec006 (patch) | |
tree | 0ab3146a9e0cfa1504c430885a6889029a14f3e4 | |
parent | 62f975d2b4030d10a50e140f44f39ede418bcec4 (diff) | |
download | cv2pdb-a32d9207c46fbe02ef60473598325e3b50aec006.zip cv2pdb-a32d9207c46fbe02ef60473598325e3b50aec006.tar.gz cv2pdb-a32d9207c46fbe02ef60473598325e3b50aec006.tar.bz2 |
Add natvis for DWARF_InfoData
This commit adds natvis support for the core DIE in-memory
representation type, which is especially helpful now that it effectively
models two "lists": children and siblings. This natvis visualizes both
as lists in the locals view.
-rw-r--r-- | src/NatvisFile.natvis | 26 | ||||
-rw-r--r-- | src/cv2pdb.vcxproj | 9 | ||||
-rw-r--r-- | src/cv2pdb.vcxproj.filters | 6 |
3 files changed, 38 insertions, 3 deletions
diff --git a/src/NatvisFile.natvis b/src/NatvisFile.natvis new file mode 100644 index 0000000..21baadc --- /dev/null +++ b/src/NatvisFile.natvis @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> + <Type Name="DWARF_InfoData"> + <DisplayString>tag={tag} code={code} {name,s}</DisplayString> + <Expand> + <Synthetic Name="children" Condition="children"> + <Expand> + <LinkedListItems> + <HeadPointer>children</HeadPointer> + <NextPointer>next</NextPointer> + <ValueNode>this</ValueNode> + </LinkedListItems> + </Expand> + </Synthetic> + <Synthetic Name="siblings" Condition="next"> + <Expand> + <LinkedListItems> + <HeadPointer>next</HeadPointer> + <NextPointer>next</NextPointer> + <ValueNode>this</ValueNode> + </LinkedListItems> + </Expand> + </Synthetic> + </Expand> + </Type> +</AutoVisualizer>
\ No newline at end of file diff --git a/src/cv2pdb.vcxproj b/src/cv2pdb.vcxproj index 6b96851..bc07d66 100644 --- a/src/cv2pdb.vcxproj +++ b/src/cv2pdb.vcxproj @@ -30,14 +30,14 @@ <ProjectGuid>{5E2BD27D-446A-4C99-9829-135F7C000D90}</ProjectGuid>
<RootNamespace>cv2pdb</RootNamespace>
<Keyword>Win32Proj</Keyword>
- <!-- guess the installed Windows SDK -->
+ <!-- guess the installed Windows SDK -->
<WindowsSdkInstallFolder_10 Condition="'$(WindowsSdkInstallFolder_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@InstallationFolder)</WindowsSdkInstallFolder_10>
<WindowsSdkInstallFolder_10 Condition="'$(WindowsSdkInstallFolder_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@InstallationFolder)</WindowsSdkInstallFolder_10>
<WindowsTargetPlatformVersion_10 Condition="'$(WindowsTargetPlatformVersion_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</WindowsTargetPlatformVersion_10>
<WindowsTargetPlatformVersion_10 Condition="'$(WindowsTargetPlatformVersion_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</WindowsTargetPlatformVersion_10>
<!-- Sometimes the version in the registry has to .0 suffix, and sometimes it doesn't. Check and add it -->
<WindowsTargetPlatformVersion_10 Condition="'$(WindowsTargetPlatformVersion_10)' != '' and !$(WindowsTargetPlatformVersion_10.EndsWith('.0'))">$(WindowsTargetPlatformVersion_10).0</WindowsTargetPlatformVersion_10>
- <WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion_10)' != ''">$(WindowsTargetPlatformVersion_10)</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion_10)' != ''">$(WindowsTargetPlatformVersion_10)</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -299,6 +299,9 @@ <ItemGroup>
<None Include="packages.config" />
</ItemGroup>
+ <ItemGroup>
+ <Natvis Include="NatvisFile.natvis" />
+ </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
@@ -310,4 +313,4 @@ </PropertyGroup>
<Error Condition="!Exists('packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.16.30\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.16.30\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets'))" />
</Target>
-</Project>
+</Project>
\ No newline at end of file diff --git a/src/cv2pdb.vcxproj.filters b/src/cv2pdb.vcxproj.filters index 87f8a84..adf6a1b 100644 --- a/src/cv2pdb.vcxproj.filters +++ b/src/cv2pdb.vcxproj.filters @@ -78,4 +78,10 @@ <Filter>Source Files</Filter>
</MASM>
</ItemGroup>
+ <ItemGroup>
+ <None Include="packages.config" />
+ </ItemGroup>
+ <ItemGroup>
+ <Natvis Include="NatvisFile.natvis" />
+ </ItemGroup>
</Project>
\ No newline at end of file |