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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="absl::lts_20240722::InlinedVector<*>">
<Intrinsic Name="_size" Expression="storage_.metadata_.value >> 1"/>
<Intrinsic Name="_is_allocated" Expression="(storage_.metadata_.value & 1) == 1"/>
<Intrinsic Name="_inlined_data" Expression="($T1*)storage_.data_.inlined.inlined_data"/>
<Intrinsic Name="_allocated_data" Expression="storage_.data_.allocated.allocated_data"/>
<DisplayString>{{ size={ _size() }}}</DisplayString>
<Expand>
<Item Name="[capacity]" ExcludeView="simple" Condition="!_is_allocated()">$T2</Item>
<Item Name="[capacity]" ExcludeView="simple" Condition="_is_allocated()">storage_.data_.allocated.allocated_capacity</Item>
<Item Name="[N]" ExcludeView="simple">$T2</Item>
<Item Name="[size]" ExcludeView="simple">_size()</Item>
<Item Name="[is_allocated]" ExcludeView="simple">_is_allocated()</Item>
<Item Name="[allocator]" ExcludeView="simple" Condition="_is_allocated()">storage_.metadata_</Item>
<IndexListItems Condition="!_is_allocated()">
<Size>_size()</Size>
<ValueNode>_inlined_data()[$i]</ValueNode>
</IndexListItems>
<IndexListItems Condition="_is_allocated()">
<Size>_size()</Size>
<ValueNode>_allocated_data()[$i]</ValueNode>
</IndexListItems>
</Expand>
</Type>
<!-- Should handle both flat hash_set and hash_map -->
<Type Name="absl::lts_20240116::container_internal::raw_hash_set<*>">
<Intrinsic Name="_commonfields" Expression="settings_.value"/>
<Intrinsic Name="_size" Expression="settings_.value.compressed_tuple_.value"/>
<Intrinsic Name="_capacity" Expression="_commonfields().capacity_"/>
<Intrinsic Name="_control" Expression="_commonfields().control_"/>
<Intrinsic Name="_slots" Expression="(slot_type*)(_commonfields().slots_)"/>
<DisplayString IncludeView="noparens">size={ _size() }</DisplayString>
<DisplayString ExcludeView="noparens">size=({_size()})</DisplayString>
<Expand>
<Item Name="[Size]">_size()</Item>
<Item Name="[Capacity]" ExcludeView="noparens">_capacity()</Item>
<CustomListItems MaxItemsPerView="100">
<Variable Name="nslot" InitialValue="0" />
<Size>_size()</Size>
<Loop>
<!-- bool IsFull(ctrl_t c) const { return c >= 0; } -->
<If Condition="_control()[nslot] >= 0">
<Item>_slots()[nslot]</Item>
</If>
<Exec>nslot++</Exec>
<Break Condition="nslot == _capacity()" />
</Loop>
</CustomListItems>
</Expand>
</Type>
<!-- Primitive types stored as a value -->
<Type Name="absl::lts_20240116::container_internal::Storage<*,*,0>">
<DisplayString IncludeView="noparens">*($T1 *){value}</DisplayString>
<DisplayString ExcludeView="noparens">(*($T1 *){value})</DisplayString>
<Expand>
<ExpandedItem>*($T1 *){value}</ExpandedItem>
</Expand>
</Type>
<!-- For storage inherited from the type -->
<Type Name="absl::lts_20240116::container_internal::Storage<*,*,1>">
<DisplayString IncludeView="noparens">*($T1 *)this</DisplayString>
<DisplayString ExcludeView="noparens">(*($T1 *)this)</DisplayString>
<Expand>
<ExpandedItem>*($T1 *)this</ExpandedItem>
</Expand>
</Type>
<Type Name="absl::lts_20240116::container_internal::map_slot_type<*>">
<DisplayString IncludeView="noparens">{value.first}, {value.second}</DisplayString>
<DisplayString ExcludeView="noparens">({value.first}, {value.second})</DisplayString>
<Expand>
<Item Name="first" ExcludeView="simple">value.first</Item>
<Item Name="second" ExcludeView="simple">value.second</Item>
</Expand>
</Type>
</AutoVisualizer>
|