-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathglare-core.natvis
45 lines (33 loc) · 1.83 KB
/
glare-core.natvis
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?xml version="1.0" encoding="utf-8"?>
<!-- Helps Visual Studio display useful debugging info for our types -->
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="Vec4f">
<DisplayString>x={x[0]}, y={x[1]}, z={x[2]}, w={x[3]}</DisplayString>
</Type>
<Type Name="Reference<*>">
<SmartPointer Usage="Minimal">ob</SmartPointer>
</Type>
<Type Name="js::Vector<*>">
<Expand>
<Item Name="size">size_</Item>
<Item Name="capacity">capacity_</Item>
<ArrayItems>
<Size>size_</Size>
<ValuePointer>e</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="glare::String">
<!-- Depending on if the on-heap bit is set (See glare::String::storingOnHeap()), display the string from direct storage or the heap -->
<DisplayString Condition="(on_heap_and_size & (1u << 31)) != 0">heap str={e}, size={on_heap_and_size & ~(1u << 31)}</DisplayString>
<DisplayString Condition="(on_heap_and_size & (1u << 31)) == 0">direct str={(char*)(&e)}, size={on_heap_and_size >> 24u}</DisplayString>
<StringView Condition="(on_heap_and_size & (1u << 31)) != 0">e,s8</StringView>
<Expand>
<Item Name="on heap">((on_heap_and_size & (1u << 31)) != 0) ? true : false</Item>
<Item Name="size">((on_heap_and_size & (1u << 31)) != 0) ? (on_heap_and_size & ~(1u << 31)) : (on_heap_and_size >> 24u)</Item>
<Item Name="capacity">((on_heap_and_size & (1u << 31)) != 0) ? capacity_storage : DIRECT_CAPACITY</Item>
<Item Name="str" Condition="(on_heap_and_size & (1u << 31)) != 0">e</Item>
<Item Name="str" Condition="(on_heap_and_size & (1u << 31)) == 0">(char*)(&e)</Item>
</Expand>
</Type>
</AutoVisualizer>