These two lines in src\etc\natvis\libstd.natvis confuse both cdb and GUI debugger available inside VS:
<Item Name="{static_cast<tuple<$T1, $T2>*>(base.table.ctrl.pointer)[-(i + 1)].__0}">static_cast<tuple<$T1, $T2>*>(base.table.ctrl.pointer)[-(i + 1)].__1</Item>
<Item>static_cast<$T1*>(map.base.table.ctrl.pointer)[-(i + 1)]</Item>
cdb gives this error
Unable to find type 'tuple<u64,u64> *' for cast.
GUI debugger just skips the visualization and only shows raw representation.
It is possible to fix visualization inside VS GUI debugger by replacing static_cast with C-style casts
<Item Name="{((tuple<$T1, $T2>*)base.table.ctrl.pointer)[-(i + 1)].__0}">((tuple<$T1, $T2>*)base.table.ctrl.pointer)[-(i + 1)].__1</Item>
<Item>(($T1*)map.base.table.ctrl.pointer)[-(i + 1)]</Item>
, but I haven't found a way to make cdb eat this yet.
Tests for other debuggers can use requirement directives like
If cdb from VS2017 toolchain is unable to perform computations required for visualizing hash set/map, then we need to introduce such requirements for cdb as well.
cc @Amanieu @MaulingMonkey
These two lines in
src\etc\natvis\libstd.natvisconfuse bothcdband GUI debugger available inside VS:cdbgives this errorGUI debugger just skips the visualization and only shows raw representation.
It is possible to fix visualization inside VS GUI debugger by replacing
static_castwith C-style casts, but I haven't found a way to make
cdbeat this yet.Tests for other debuggers can use requirement directives like
If
cdbfrom VS2017 toolchain is unable to perform computations required for visualizing hash set/map, then we need to introduce such requirements forcdbas well.cc @Amanieu @MaulingMonkey