View Issue Details

IDProjectCategoryView StatusLast Update
0003032NoesisGUIC++ SDKpublic2024-01-25 01:30
ReporterHateDread Assigned Tojsantos  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version3.2 
Summary0003032: Natvis not working / PDBs missing
DescriptionAs per thread https://www.noesisengine.com/forums/viewtopic.php?t=3193, the Natvis file/functionality is not working in a C++ build and may require the PDBs.
Steps To Reproduce1. Set up some project using the publicly-available, non-PDB build
2. Attempt to debug the project
3. Observe the complete lack of symbols for Noesis types
TagsNo tags attached.
PlatformAny

Activities

jsantos

jsantos

2024-01-25 01:12

manager   ~0009118

Even with the PDB, it seems we are not linking the Natvis file (/NATVIS must be used as explained here https://learn.microsoft.com/en-us/cpp/build/reference/natvis-add-natvis-to-pdb?view=msvc-140).

I need to figure this out. Meanwhile I am attaching our latest natvis file here.
Noesis.natvis (4,403 bytes)   
<?xml version="1.0" encoding="utf-8"?>

<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">

<Type Name="Noesis::ArrayRef&lt;*&gt;">
  <DisplayString>{{ size={mSize} }}</DisplayString>
  <Expand>
    <ArrayItems>
      <Size>mSize</Size>
      <ValuePointer>($T1*)mBegin</ValuePointer>
    </ArrayItems>
  </Expand>
</Type>
  
<Type Name="Noesis::BaseVector&lt;*&gt;">
  <DisplayString>{{ size={mSize} }}</DisplayString>
  <Expand>
    <Item Name="[capacity]">mCapacity</Item>
    <Item Name="[bytes]">sizeof(ValueType) * mCapacity</Item>
    <ArrayItems>
      <Size>mSize</Size>
      <ValuePointer>(ValueType*)mBegin</ValuePointer>
    </ArrayItems>
  </Expand>
</Type>

<Type Name="Noesis::BaseString">
  <DisplayString Condition="mIsSmall == 1">{ (const char*)(((FixedString&lt;24&gt;*)this)->mSmallString), na }</DisplayString>
  <DisplayString Condition="mIsSmall == 0">{ (const char*)(((FixedString&lt;24&gt;*)this)->mBegin), na }</DisplayString>
  <StringView Condition="mIsSmall == 1">((const char*)((FixedString&lt;24&gt;*)this)->mSmallString)</StringView>
  <StringView Condition="mIsSmall == 0">((const char*)((FixedString&lt;24&gt;*)this)->mBegin)</StringView>
  <Expand>
    <Item Name="[size]">mSize</Item>
    <Item Name="[capacity]">mCapacity</Item>
    <ArrayItems>
      <Size>mSize</Size>
      <ValuePointer Condition="mIsSmall == 1">((FixedString&lt;24&gt;*)this)->mSmallString</ValuePointer>
      <ValuePointer Condition="mIsSmall == 0">((FixedString&lt;24&gt;*)this)->mBegin</ValuePointer>
    </ArrayItems>
  </Expand>
</Type>

<Type Name="Noesis::HashMapImpl&lt;*&gt;">
  <DisplayString>{{ size={mNumEntries}, buckets={mNumBuckets} }}</DisplayString>
  <Expand>
    <Item Name="[size]">mNumEntries</Item>
    <Item Name="[buckets]">mNumBuckets</Item>
    <Item Name="[capacity]">mNumInlinedBuckets</Item>
    <Item Condition="mNumBuckets &gt; mNumInlinedBuckets" Name="[bytes]">sizeof($T1) * mNumBuckets</Item>
    <Item Condition="mNumBuckets &lt;= mNumInlinedBuckets" Name="[bytes]">sizeof($T1) * mNumInlinedBuckets</Item>
    <ArrayItems>
      <Size>mNumBuckets</Size>
      <ValuePointer>mBuckets</ValuePointer>
    </ArrayItems>
  </Expand>
</Type>

<Type Name="Noesis::BaseRefCounted" Inheritable="false">
  <DisplayString>{{ ref={mRefCount.val} }}</DisplayString>
</Type>

<Type Name="Noesis::BaseComponent" Inheritable="false">
  <DisplayString>{{ ref={mRefCount.val} }}</DisplayString>
</Type>

<Type Name="Noesis::Ptr&lt;*&gt;">
  <DisplayString Condition="mPtr != nullptr">{{ val={*mPtr} ref={mPtr->mRefCount.val} }}</DisplayString>
  <DisplayString Condition="mPtr == nullptr">{{ val={nullptr} }}</DisplayString>
  <Expand>
    <Item Condition="mPtr != nullptr" Name="[ref]">mPtr->mRefCount.val</Item>
    <Item Name="[ptr]">mPtr</Item>
  </Expand>
</Type>

<Type Name="Noesis::Boxed&lt;*&gt;">
  <DisplayString>{{ boxed={mValue} }}</DisplayString>
</Type>

<Type Name="Noesis::Symbol">
  <DisplayString>{{ {((const char**)Noesis.dll!gSymbols.mBegin)[mIndex],na} }}</DisplayString>
</Type>

<Type Name="Noesis::Symbol">
  <DisplayString>{{ {((const char**)Core.Kernel.dll!gSymbols.mBegin)[mIndex],na} }}</DisplayString>
</Type>

<Type Name="Noesis::Symbol">
  <DisplayString>{{ {((const char**)gSymbols.mBegin)[mIndex],na} }}</DisplayString>
</Type>

<Type Name="Noesis::Type">
  <DisplayString>{mName,na}</DisplayString>
</Type>

<Type Name="Noesis::Uri">
  <DisplayString Condition="mAssemblyLen == 0">{ mUri.mSmallString + mPathStart + mSlashLen, na }</DisplayString>
  <DisplayString Condition="mAssemblyLen != 0">{ (const char*)mUri.mSmallString + mPathStart + mAssemblyLen + 12, na }</DisplayString>
  <Expand>
    <Item Name="[scheme]" Condition="mSchemeLen == 0">""</Item>
    <Item Name="[scheme]" Condition="mSchemeLen != 0">mUri.mSmallString, [mSchemeLen]na</Item>
    <Item Name="[assembly]" Condition="mAssemblyLen == 0">""</Item>
    <Item Name="[assembly]" Condition="mAssemblyLen != 0">mUri.mSmallString + mPathStart + 1, [mAssemblyLen]na</Item>
    <Item Name="[path]" Condition="mAssemblyLen == 0">mUri.mSmallString + mPathStart + mSlashLen, na</Item>
    <Item Name="[path]" Condition="mAssemblyLen != 0">mUri.mSmallString + mPathStart + mAssemblyLen + 12, na</Item>
  </Expand>
</Type>

</AutoVisualizer>
Noesis.natvis (4,403 bytes)   
jsantos

jsantos

2024-01-25 01:30

manager   ~0009119

Last edited: 2024-01-25 01:30

https://developercommunity.visualstudio.com/t/c-library-natvis-not-loaded/136621

Additionally if you load a natvis embedded into a dll's pdb, the natvis only applies
when stepping through code in the dll (as opposed to when it's part of the project,
it will load for all stack frames).

So it seems, embedding the NatVis in the PDB is not going to work as we want and we are going to need to distribute the NatVis in the SDK.

Issue History

Date Modified Username Field Change
2024-01-23 14:40 HateDread New Issue
2024-01-25 01:10 jsantos Assigned To => jsantos
2024-01-25 01:10 jsantos Status new => assigned
2024-01-25 01:12 jsantos Note Added: 0009118
2024-01-25 01:12 jsantos File Added: Noesis.natvis
2024-01-25 01:30 jsantos Note Added: 0009119
2024-01-25 01:30 jsantos Note Edited: 0009119
2024-01-25 01:30 jsantos Note Edited: 0009119