diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2014-05-15 15:33:51 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2014-05-29 14:21:03 +0200 |
| commit | eea329b0f71905518902d34ef77c0923096dde1d (patch) | |
| tree | e734cbe1994eb783eb47bc01f106ba69c443689a /src/test/debuginfo/recursive-struct.rs | |
| parent | 138089355d7a1bc28fa58f2bea7680af96bd5b92 (diff) | |
| download | rust-eea329b0f71905518902d34ef77c0923096dde1d.tar.gz rust-eea329b0f71905518902d34ef77c0923096dde1d.zip | |
debuginfo: Make DWARF representation of enums uniform.
So far the DWARF information for enums was different for regular enums, univariant enums, Option-like enums, etc. Regular enums were encoded as unions of structs, while the other variants were encoded as bare structs. With the changes in this PR all enums are encoded as unions so that debuggers can reconstruct if something originally was a struct, a univariant enum, or an Option-like enum. For the latter case, information about the Null variant is encoded into the union field name. This information can then be used by the debugger to print a None value actually as None instead of Some(0x0).
Diffstat (limited to 'src/test/debuginfo/recursive-struct.rs')
| -rw-r--r-- | src/test/debuginfo/recursive-struct.rs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/test/debuginfo/recursive-struct.rs b/src/test/debuginfo/recursive-struct.rs index aa13072eb53..518ef62fe9a 100644 --- a/src/test/debuginfo/recursive-struct.rs +++ b/src/test/debuginfo/recursive-struct.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-tidy-linelength // ignore-android: FIXME(#10381) #![feature(managed_boxes)] @@ -20,53 +21,53 @@ // gdb-command:print stack_unique.value // gdb-check:$1 = 0 -// gdb-command:print stack_unique.next->value +// gdb-command:print stack_unique.next.RUST$ENCODED$ENUM$0$Empty.val->value // gdb-check:$2 = 1 // gdb-command:print unique_unique->value // gdb-check:$3 = 2 -// gdb-command:print unique_unique->next->value +// gdb-command:print unique_unique->next.RUST$ENCODED$ENUM$0$Empty.val->value // gdb-check:$4 = 3 // gdb-command:print box_unique->val.value // gdb-check:$5 = 4 -// gdb-command:print box_unique->val.next->value +// gdb-command:print box_unique->val.next.RUST$ENCODED$ENUM$0$Empty.val->value // gdb-check:$6 = 5 // gdb-command:print vec_unique[0].value // gdb-check:$7 = 6.5 -// gdb-command:print vec_unique[0].next->value +// gdb-command:print vec_unique[0].next.RUST$ENCODED$ENUM$0$Empty.val->value // gdb-check:$8 = 7.5 // gdb-command:print borrowed_unique->value // gdb-check:$9 = 8.5 -// gdb-command:print borrowed_unique->next->value +// gdb-command:print borrowed_unique->next.RUST$ENCODED$ENUM$0$Empty.val->value // gdb-check:$10 = 9.5 // MANAGED // gdb-command:print stack_managed.value // gdb-check:$11 = 10 -// gdb-command:print stack_managed.next.val->value +// gdb-command:print stack_managed.next.RUST$ENCODED$ENUM$0$Empty.val->val.value // gdb-check:$12 = 11 // gdb-command:print unique_managed->value // gdb-check:$13 = 12 -// gdb-command:print unique_managed->next.val->value +// gdb-command:print unique_managed->next.RUST$ENCODED$ENUM$0$Empty.val->val.value // gdb-check:$14 = 13 // gdb-command:print box_managed.val->value // gdb-check:$15 = 14 -// gdb-command:print box_managed->val->next.val->value +// gdb-command:print box_managed->val->next.RUST$ENCODED$ENUM$0$Empty.val->val.value // gdb-check:$16 = 15 // gdb-command:print vec_managed[0].value // gdb-check:$17 = 16.5 -// gdb-command:print vec_managed[0].next.val->value +// gdb-command:print vec_managed[0].next.RUST$ENCODED$ENUM$0$Empty.val->val.value // gdb-check:$18 = 17.5 // gdb-command:print borrowed_managed->value // gdb-check:$19 = 18.5 -// gdb-command:print borrowed_managed->next.val->value +// gdb-command:print borrowed_managed->next.RUST$ENCODED$ENUM$0$Empty.val->val.value // gdb-check:$20 = 19.5 // LONG CYCLE @@ -97,7 +98,7 @@ // gdb-command:print (*****long_cycle_w_anonymous_types).value // gdb-check:$31 = 30 -// gdb-command:print (*****((*****long_cycle_w_anonymous_types).next)).value +// gdb-command:print (*****((*****long_cycle_w_anonymous_types).next.RUST$ENCODED$ENUM$0$Empty.val)).value // gdb-check:$32 = 31 // gdb-command:continue |
