Skip to content

Commit be79edb

Browse files
committed
Update debuginfo tests.
1 parent 28243a5 commit be79edb

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

src/test/debuginfo/option-like-enum.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
// gdb-command:finish
1717

1818
// gdb-command:print some
19-
// gdb-check:$1 = {0x12345678}
19+
// gdb-check:$1 = (u32 *) 0x12345678
2020

2121
// gdb-command:print none
22-
// gdb-check:$2 = {0x0}
22+
// gdb-check:$2 = (u32 *) 0x0
2323

2424
// gdb-command:print full
2525
// gdb-check:$3 = {454545, 0x87654321, 9988}
@@ -41,6 +41,8 @@
4141
// contains a non-nullable pointer, then this value is used as the discriminator.
4242
// The test cases in this file make sure that something readable is generated for
4343
// this kind of types.
44+
// If the non-empty variant contains a single non-nullable pointer than the whole
45+
// item is represented as just a pointer and not wrapped in a struct.
4446
// Unfortunately (for these test cases) the content of the non-discriminant fields
4547
// in the null-case is not defined. So we just read the discriminator field in
4648
// this case (by casting the value to a memory-equivalent struct).

src/test/debuginfo/recursive-struct.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,53 +20,53 @@
2020

2121
// gdb-command:print stack_unique.value
2222
// gdb-check:$1 = 0
23-
// gdb-command:print stack_unique.next.val->value
23+
// gdb-command:print stack_unique.next->value
2424
// gdb-check:$2 = 1
2525

2626
// gdb-command:print unique_unique->value
2727
// gdb-check:$3 = 2
28-
// gdb-command:print unique_unique->next.val->value
28+
// gdb-command:print unique_unique->next->value
2929
// gdb-check:$4 = 3
3030

3131
// gdb-command:print box_unique->val.value
3232
// gdb-check:$5 = 4
33-
// gdb-command:print box_unique->val.next.val->value
33+
// gdb-command:print box_unique->val.next->value
3434
// gdb-check:$6 = 5
3535

3636
// gdb-command:print vec_unique[0].value
3737
// gdb-check:$7 = 6.5
38-
// gdb-command:print vec_unique[0].next.val->value
38+
// gdb-command:print vec_unique[0].next->value
3939
// gdb-check:$8 = 7.5
4040

4141
// gdb-command:print borrowed_unique->value
4242
// gdb-check:$9 = 8.5
43-
// gdb-command:print borrowed_unique->next.val->value
43+
// gdb-command:print borrowed_unique->next->value
4444
// gdb-check:$10 = 9.5
4545

4646
// MANAGED
4747
// gdb-command:print stack_managed.value
4848
// gdb-check:$11 = 10
49-
// gdb-command:print stack_managed.next.val->val.value
49+
// gdb-command:print stack_managed.next.val->value
5050
// gdb-check:$12 = 11
5151

5252
// gdb-command:print unique_managed->value
5353
// gdb-check:$13 = 12
54-
// gdb-command:print unique_managed->next.val->val.value
54+
// gdb-command:print unique_managed->next.val->value
5555
// gdb-check:$14 = 13
5656

57-
// gdb-command:print box_managed->val.value
57+
// gdb-command:print box_managed.val->value
5858
// gdb-check:$15 = 14
59-
// gdb-command:print box_managed->val.next.val->val.value
59+
// gdb-command:print box_managed->val->next.val->value
6060
// gdb-check:$16 = 15
6161

6262
// gdb-command:print vec_managed[0].value
6363
// gdb-check:$17 = 16.5
64-
// gdb-command:print vec_managed[0].next.val->val.value
64+
// gdb-command:print vec_managed[0].next.val->value
6565
// gdb-check:$18 = 17.5
6666

6767
// gdb-command:print borrowed_managed->value
6868
// gdb-check:$19 = 18.5
69-
// gdb-command:print borrowed_managed->next.val->val.value
69+
// gdb-command:print borrowed_managed->next.val->value
7070
// gdb-check:$20 = 19.5
7171

7272
// LONG CYCLE
@@ -97,7 +97,7 @@
9797
// gdb-command:print (*****long_cycle_w_anonymous_types).value
9898
// gdb-check:$31 = 30
9999

100-
// gdb-command:print (*****((*****long_cycle_w_anonymous_types).next.val)).value
100+
// gdb-command:print (*****((*****long_cycle_w_anonymous_types).next)).value
101101
// gdb-check:$32 = 31
102102

103103
// gdb-command:continue

0 commit comments

Comments
 (0)