Skip to content

Commit 64b7b4f

Browse files
committed
---
yaml --- r: 171430 b: refs/heads/batch c: 3d3670b h: refs/heads/master v: v3
1 parent ae27465 commit 64b7b4f

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/issue-18208-method-dispatch-2: 9e1eae4fb9b6527315b4441cf8a0f5ca911d1671
3030
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
32-
refs/heads/batch: d009a761827e45045e9570535694c7ed61a85c36
32+
refs/heads/batch: 3d3670bc65a07f1d4dcaca8d0965d3f0ba040101
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 496dc4eae7de9d14cd49511a9acfbf5f11ae6c3f
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928

branches/batch/src/etc/gdb_rust_pretty_printing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ def rust_pretty_printer_lookup_function(val):
6262
assert first_variant_name.startswith("RUST$ENCODED$ENUM$")
6363
# This is a space-optimized enum
6464
last_separator_index = first_variant_name.rfind("$")
65-
start_index = len("RUST$ENCODED$ENUM")
66-
disr_field_indices = first_variant_name[start_index + 1 :
67-
last_separator_index]
68-
disr_field_indices = [int(index) for index in disr_field_indices.split("$")]
65+
start_index = len("RUST$ENCODED$ENUM$")
66+
disr_field_indices = first_variant_name[start_index :
67+
last_separator_index].split("$")
68+
disr_field_indices = [int(index) for index in disr_field_indices]
6969

7070
sole_variant_val = val[enum_members[0]]
7171
discriminant = sole_variant_val

branches/batch/src/etc/lldb_rust_formatters.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ def print_struct_val_starting_from(field_start_index, val, internal_dict):
7979
has_field_names = type_has_field_names(t)
8080

8181
if has_field_names:
82-
template = "%(type_name)s {\n%(body)s\n}"
83-
separator = ", \n"
82+
template = "%(type_name)s {\n%(body)s\n}"
83+
separator = ", \n"
8484
else:
85-
template = "%(type_name)s(%(body)s)"
86-
separator = ", "
85+
template = "%(type_name)s(%(body)s)"
86+
separator = ", "
8787

8888
if type_name.startswith("("):
8989
# this is a tuple, so don't print the type name
@@ -125,20 +125,20 @@ def print_enum_val(val, internal_dict):
125125
if last_separator_index == -1:
126126
return "<invalid enum encoding: %s>" % first_variant_name
127127

128-
second_last_separator_index = first_variant_name.rfind("$", 0, last_separator_index)
129-
if second_last_separator_index == -1:
130-
return "<invalid enum encoding: %s>" % first_variant_name
128+
start_index = len("RUST$ENCODED$ENUM$")
131129

132-
# Extract index of the discriminator field
130+
# Extract indices of the discriminator field
133131
try:
134-
disr_field_index = first_variant_name[second_last_separator_index + 1 :
135-
last_separator_index]
136-
disr_field_index = int(disr_field_index)
132+
disr_field_indices = first_variant_name[start_index :
133+
last_separator_index].split("$")
134+
disr_field_indices = [int(index) for index in dis_field_indices]
137135
except:
138136
return "<invalid enum encoding: %s>" % first_variant_name
139137

140138
# Read the discriminant
141-
disr_val = val.GetChildAtIndex(0).GetChildAtIndex(disr_field_index)
139+
disr_val = val.GetChildAtIndex(0)
140+
for index in disr_field_indices:
141+
disr_val = disr_val.GetChildAtIndex(disr_field_index)
142142

143143
# If the discriminant field is a fat pointer we have to consider the
144144
# first word as the true discriminant

0 commit comments

Comments
 (0)