-
Notifications
You must be signed in to change notification settings - Fork 84
/
protobuf.natvis
50 lines (47 loc) · 2.17 KB
/
protobuf.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
46
47
48
49
50
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="google::protobuf::RepeatedField<*>">
<DisplayString>{{ size={current_size_} }}</DisplayString>
<Expand>
<Item Name="[size]" ExcludeView="simple">current_size_</Item>
<Item Name="[capacity]" ExcludeView="simple">total_size_</Item>
<ArrayItems Condition="ptr_.rep != 0">
<Size>current_size_</Size>
<ValuePointer>($T1*)ptr_.rep->elements</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="google::protobuf::RepeatedPtrField<*>">
<DisplayString>{{ size={current_size_} }}</DisplayString>
<Expand>
<Item Name="[size]" ExcludeView="simple">current_size_</Item>
<Item Name="[capacity]" ExcludeView="simple">total_size_</Item>
<ArrayItems Condition="rep_ != 0">
<Size>current_size_</Size>
<ValuePointer>($T1**)rep_->elements</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<Type Name="google::protobuf::Map<*>">
<DisplayString>{{size={elements_->num_elements_}}}</DisplayString>
<Expand>
<CustomListItems MaxItemsPerView="5000" ExcludeView="Test">
<Variable Name="iBucket" InitialValue="elements_->index_of_first_non_null_" />
<Variable Name="pBucket" InitialValue="elements_->table_ == nullptr ? nullptr : ((InnerMap::Node**)elements_->table_)[elements_->index_of_first_non_null_]" />
<Variable Name="iBucketIncrement" InitialValue="-1" />
<Size>elements_->num_elements_</Size>
<Loop>
<If Condition="pBucket == nullptr">
<Exec>iBucket++</Exec>
<Exec>iBucketIncrement = __findnonnull(((InnerMap::Node**)elements_->table_) + iBucket, elements_->num_buckets_ - iBucket)</Exec>
<Break Condition="iBucketIncrement == -1" />
<Exec>iBucket += iBucketIncrement</Exec>
<Exec>pBucket = ((InnerMap::Node**)elements_->table_)[iBucket]</Exec>
</If>
<Item>(((InnerMap::Node*)pBucket)->kv.v_)</Item>
<Exec>pBucket = pBucket->next</Exec>
</Loop>
</CustomListItems>
</Expand>
</Type>
</AutoVisualizer>