-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.Category: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsToolchain: MSVC, Operating system: Windows
Description
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
// min-gdb-version: 8.2
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.
Metadata
Metadata
Assignees
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.Category: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsToolchain: MSVC, Operating system: Windows