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/method-on-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/method-on-tuple-struct.rs')
| -rw-r--r-- | src/test/debuginfo/method-on-tuple-struct.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/debuginfo/method-on-tuple-struct.rs b/src/test/debuginfo/method-on-tuple-struct.rs index 97d4496cce1..4ea0fd44475 100644 --- a/src/test/debuginfo/method-on-tuple-struct.rs +++ b/src/test/debuginfo/method-on-tuple-struct.rs @@ -18,7 +18,7 @@ // STACK BY REF // gdb-command:print *self -// gdb-check:$1 = {100, -100.5} +// gdb-check:$1 = {__0 = 100, __1 = -100.5} // gdb-command:print arg1 // gdb-check:$2 = -1 // gdb-command:print arg2 @@ -27,7 +27,7 @@ // STACK BY VAL // gdb-command:print self -// gdb-check:$4 = {100, -100.5} +// gdb-check:$4 = {__0 = 100, __1 = -100.5} // gdb-command:print arg1 // gdb-check:$5 = -3 // gdb-command:print arg2 @@ -36,7 +36,7 @@ // OWNED BY REF // gdb-command:print *self -// gdb-check:$7 = {200, -200.5} +// gdb-check:$7 = {__0 = 200, __1 = -200.5} // gdb-command:print arg1 // gdb-check:$8 = -5 // gdb-command:print arg2 @@ -45,7 +45,7 @@ // OWNED BY VAL // gdb-command:print self -// gdb-check:$10 = {200, -200.5} +// gdb-check:$10 = {__0 = 200, __1 = -200.5} // gdb-command:print arg1 // gdb-check:$11 = -7 // gdb-command:print arg2 @@ -54,7 +54,7 @@ // OWNED MOVED // gdb-command:print *self -// gdb-check:$13 = {200, -200.5} +// gdb-check:$13 = {__0 = 200, __1 = -200.5} // gdb-command:print arg1 // gdb-check:$14 = -9 // gdb-command:print arg2 |
