Skip to content

Commit d3adbe3

Browse files
Update Natvis defintions following latest changes to the debuginfo layouts for enums generated by the Rust compiler.
1 parent 192add3 commit d3adbe3

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

debug_metadata/regex.natvis

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
</Type>
99

1010
<Type Name="regex::re_bytes::Captures">
11-
<Intrinsic Name="discriminant" Expression="locs.__0.buf.ptr.pointer.pointer[i].discriminant">
11+
<Intrinsic Name="tag" Expression="locs.__0.buf.ptr.pointer.pointer[i].tag">
1212
<Parameter Name="i" Type="int" />
1313
</Intrinsic>
14-
<Intrinsic Name="location" Expression="locs.__0.buf.ptr.pointer.pointer[i].variant1.__0">
14+
<Intrinsic Name="location" Expression="locs.__0.buf.ptr.pointer.pointer[i].variant1.value.__0">
1515
<Parameter Name="i" Type="int" />
1616
</Intrinsic>
1717
<Intrinsic Name="match_length" Expression="location(end)-location(start)">
@@ -27,7 +27,7 @@
2727
<Variable Name="index" InitialValue="0" />
2828
<Variable Name="len" InitialValue="locs.__0.len" />
2929
<Loop>
30-
<Break Condition="i &gt;= len || discriminant(i) == 0" />
30+
<Break Condition="i &gt;= len || tag(i) == 0" />
3131
<Item Name="{index}">(char*)text.data_ptr+location(i),[location(i+1)-location(i)]s8</Item>
3232
<Exec>i+=2</Exec>
3333
<Exec>index++</Exec>
@@ -56,10 +56,10 @@
5656
</Type>
5757

5858
<Type Name="regex::re_unicode::Captures">
59-
<Intrinsic Name="discriminant" Expression="locs.__0.buf.ptr.pointer.pointer[i].discriminant">
59+
<Intrinsic Name="tag" Expression="locs.__0.buf.ptr.pointer.pointer[i].tag">
6060
<Parameter Name="i" Type="int" />
6161
</Intrinsic>
62-
<Intrinsic Name="location" Expression="locs.__0.buf.ptr.pointer.pointer[i].variant1.__0">
62+
<Intrinsic Name="location" Expression="locs.__0.buf.ptr.pointer.pointer[i].variant1.value.__0">
6363
<Parameter Name="i" Type="int" />
6464
</Intrinsic>
6565
<Intrinsic Name="match_length" Expression="location(end)-location(start)">
@@ -75,7 +75,7 @@
7575
<Variable Name="index" InitialValue="0" />
7676
<Variable Name="len" InitialValue="locs.__0.len" />
7777
<Loop>
78-
<Break Condition="i &gt;= len || discriminant(i) == 0" />
78+
<Break Condition="i &gt;= len || tag(i) == 0" />
7979
<Item Name="{index}">(char*)text.data_ptr+location(i),[location(i+1)-location(i)]s8</Item>
8080
<Exec>i+=2</Exec>
8181
<Exec>index++</Exec>

tests/debugger_visualizer.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ re : { text="^(?P<year>\d{4})-(?P<month>\d{2})-(?P<day>\d{2})$" }
2626
[+0x320] dfa [Type: regex::prog::Program]
2727
[+0x640] dfa_reverse [Type: regex::prog::Program]
2828
[+0x960] suffixes [Type: regex::literal::imp::LiteralSearcher]
29-
[+0xc18] ac : None [Type: enum$<core::option::Option<aho_corasick::ahocorasick::AhoCorasick<u32> >, 0, 1, Some>]
30-
[+0xda0] match_type : Dfa [Type: enum$<regex::exec::MatchType>]
29+
[+0xc18] ac : None [Type: enum2$<core::option::Option<aho_corasick::ahocorasick::AhoCorasick<u32> > >]
30+
[+0xda0] match_type : Dfa [Type: enum2$<regex::exec::MatchType>]
3131
3232
captures : { named_groups=0x3 } [Type: regex::re_unicode::Captures]
3333
[<Raw View>] [Type: regex::re_unicode::Captures]
@@ -119,8 +119,8 @@ re : { text="^(?P<year>\d{4})-(?P<month>\d{2})-(?P<day>\d{2})$" }
119119
[+0x320] dfa [Type: regex::prog::Program]
120120
[+0x640] dfa_reverse [Type: regex::prog::Program]
121121
[+0x960] suffixes [Type: regex::literal::imp::LiteralSearcher]
122-
[+0xc18] ac : None [Type: enum$<core::option::Option<aho_corasick::ahocorasick::AhoCorasick<u32> >, 0, 1, Some>]
123-
[+0xda0] match_type : Dfa [Type: enum$<regex::exec::MatchType>]
122+
[+0xc18] ac : None [Type: enum2$<core::option::Option<aho_corasick::ahocorasick::AhoCorasick<u32> > >]
123+
[+0xda0] match_type : Dfa [Type: enum2$<regex::exec::MatchType>]
124124
125125
captures : { named_groups=0x3 } [Type: regex::re_bytes::Captures]
126126
[<Raw View>] [Type: regex::re_bytes::Captures]

0 commit comments

Comments
 (0)