Bug 12899 – slices don't work in memory window

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
visuald
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2014-06-12T14:51:00Z
Last change time
2019-05-11T14:46:11Z
Keywords
symdeb
Assigned to
No Owner
Creator
Manu

Comments

Comment #0 by turkeyman — 2014-06-12T14:51:00Z
In VS, Debug->Windows->Memory shows a memory view. Usually you can paste pointers in the address box and view the memory at that pointer. This doesn't work for slices. Instead, it shows the memory of the slice structure itself, not what it points to. Additionally, mySlice.ptr doesn't work in the debugger either. I can't work out how to get the pointer from a slice in expression evaluation. Slices appear as a struct with a single 'length' element, which you can view by pressing the '+' (expand) button next to the slice. But the expression mySlice.length doesn't work either.
Comment #1 by r.sagitario — 2014-06-20T19:30:40Z
As far as I can see, showing just the length value happens for function arguments only. I remember there has been some special treatment to arguments regarding x64 debug info, it seems the visualizer cannot deal with this. To display the raw struct of array arguments without visualizer, you can use "mySlice,!" in the watch window.