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/tuple-struct.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/tuple-struct.rs')
| -rw-r--r-- | src/test/debuginfo/tuple-struct.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/debuginfo/tuple-struct.rs b/src/test/debuginfo/tuple-struct.rs index e679dac9546..5e4e8494574 100644 --- a/src/test/debuginfo/tuple-struct.rs +++ b/src/test/debuginfo/tuple-struct.rs @@ -17,22 +17,22 @@ // gdb-command:run // gdb-command:print no_padding16 -// gdb-check:$1 = {10000, -10001} +// gdb-check:$1 = {__0 = 10000, __1 = -10001} // gdb-command:print no_padding32 -// gdb-check:$2 = {-10002, -10003.5, 10004} +// gdb-check:$2 = {__0 = -10002, __1 = -10003.5, __2 = 10004} // gdb-command:print no_padding64 -// gdb-check:$3 = {-10005.5, 10006, 10007} +// gdb-check:$3 = {__0 = -10005.5, __1 = 10006, __2 = 10007} // gdb-command:print no_padding163264 -// gdb-check:$4 = {-10008, 10009, 10010, 10011} +// gdb-check:$4 = {__0 = -10008, __1 = 10009, __2 = 10010, __3 = 10011} // gdb-command:print internal_padding -// gdb-check:$5 = {10012, -10013} +// gdb-check:$5 = {__0 = 10012, __1 = -10013} // gdb-command:print padding_at_end -// gdb-check:$6 = {-10014, 10015} +// gdb-check:$6 = {__0 = -10014, __1 = 10015} // === LLDB TESTS ================================================================================== |
