diff options
| author | bors <bors@rust-lang.org> | 2015-04-13 12:39:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-04-13 12:39:49 +0000 |
| commit | b9ed9e2a326cafa6f2445aec7221dc419089cf5f (patch) | |
| tree | 9163f199f70e5b84c88c86dd08d4b64851702c8d /src/test/debuginfo/unique-enum.rs | |
| parent | 3cac76bcf239c5db7d612eea52dd39be6e0281b4 (diff) | |
| parent | 03f92694966259ee156bb8f3a7ef9d4dc587ecb9 (diff) | |
| download | rust-b9ed9e2a326cafa6f2445aec7221dc419089cf5f.tar.gz rust-b9ed9e2a326cafa6f2445aec7221dc419089cf5f.zip | |
Auto merge of #24351 - michaelwoerister:named-tuple-fields, r=alexcrichton
This PR makes `rustc` emit field names for tuple fields in DWARF. Formerly there was no way of directly accessing the fields of a tuple in GDB and LLDB since there is no C/C++ equivalent to this. Now, the debugger sees the name `__{field-index}` for tuple fields. So you can type for example `some_tuple_val.__2` to get the third tuple component.
When pretty printers are used (e.g. via `rust-gdb` or `rust-lldb`) these artificial field names will not clutter tuple rendering (which was the main motivation for not doing this in the past).
Solves #21948.
Diffstat (limited to 'src/test/debuginfo/unique-enum.rs')
| -rw-r--r-- | src/test/debuginfo/unique-enum.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/debuginfo/unique-enum.rs b/src/test/debuginfo/unique-enum.rs index e450ead009b..0252e3b54ff 100644 --- a/src/test/debuginfo/unique-enum.rs +++ b/src/test/debuginfo/unique-enum.rs @@ -18,13 +18,13 @@ // gdb-command:run // gdb-command:print *the_a -// gdb-check:$1 = {{RUST$ENUM$DISR = TheA, x = 0, y = 8970181431921507452}, {RUST$ENUM$DISR = TheA, 0, 2088533116, 2088533116}} +// gdb-check:$1 = {{RUST$ENUM$DISR = TheA, x = 0, y = 8970181431921507452}, {RUST$ENUM$DISR = TheA, __0 = 0, __1 = 2088533116, __2 = 2088533116}} // gdb-command:print *the_b -// gdb-check:$2 = {{RUST$ENUM$DISR = TheB, x = 0, y = 1229782938247303441}, {RUST$ENUM$DISR = TheB, 0, 286331153, 286331153}} +// gdb-check:$2 = {{RUST$ENUM$DISR = TheB, x = 0, y = 1229782938247303441}, {RUST$ENUM$DISR = TheB, __0 = 0, __1 = 286331153, __2 = 286331153}} // gdb-command:print *univariant -// gdb-check:$3 = {{123234}} +// gdb-check:$3 = {{__0 = 123234}} // === LLDB TESTS ================================================================================== |
