about summary refs log tree commit diff
path: root/src/test/debuginfo/generic-function.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-04-13 12:39:49 +0000
committerbors <bors@rust-lang.org>2015-04-13 12:39:49 +0000
commitb9ed9e2a326cafa6f2445aec7221dc419089cf5f (patch)
tree9163f199f70e5b84c88c86dd08d4b64851702c8d /src/test/debuginfo/generic-function.rs
parent3cac76bcf239c5db7d612eea52dd39be6e0281b4 (diff)
parent03f92694966259ee156bb8f3a7ef9d4dc587ecb9 (diff)
downloadrust-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/generic-function.rs')
-rw-r--r--src/test/debuginfo/generic-function.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/debuginfo/generic-function.rs b/src/test/debuginfo/generic-function.rs
index 1748083b2ba..890133c58c8 100644
--- a/src/test/debuginfo/generic-function.rs
+++ b/src/test/debuginfo/generic-function.rs
@@ -21,7 +21,7 @@
 // gdb-command:print *t1
 // gdb-check:$2 = 2.5
 // gdb-command:print ret
-// gdb-check:$3 = {{1, 2.5}, {2.5, 1}}
+// gdb-check:$3 = {__0 = {__0 = 1, __1 = 2.5}, __1 = {__0 = 2.5, __1 = 1}}
 // gdb-command:continue
 
 // gdb-command:print *t0
@@ -29,7 +29,7 @@
 // gdb-command:print *t1
 // gdb-check:$5 = 4
 // gdb-command:print ret
-// gdb-check:$6 = {{3.5, 4}, {4, 3.5}}
+// gdb-check:$6 = {__0 = {__0 = 3.5, __1 = 4}, __1 = {__0 = 4, __1 = 3.5}}
 // gdb-command:continue
 
 // gdb-command:print *t0
@@ -37,7 +37,7 @@
 // gdb-command:print *t1
 // gdb-check:$8 = {a = 6, b = 7.5}
 // gdb-command:print ret
-// gdb-check:$9 = {{5, {a = 6, b = 7.5}}, {{a = 6, b = 7.5}, 5}}
+// gdb-check:$9 = {__0 = {__0 = 5, __1 = {a = 6, b = 7.5}}, __1 = {__0 = {a = 6, b = 7.5}, __1 = 5}}
 // gdb-command:continue