aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-03-11 07:59:14 -0600
committerTom Tromey <tromey@adacore.com>2020-03-11 07:59:37 -0600
commit976862ed563047be58effc4b02fe75ed064f77b7 (patch)
tree2a58c83c9a6716e1dfa2b90d37f619c9827848df
parent7462c383f9849aab40f156854a72f0a93305124a (diff)
downloadbinutils-976862ed563047be58effc4b02fe75ed064f77b7.zip
binutils-976862ed563047be58effc4b02fe75ed064f77b7.tar.gz
binutils-976862ed563047be58effc4b02fe75ed064f77b7.tar.bz2
Mark discriminants as artificial in gdb.dwarf2/variant.exp
While working on a variant part patch, I notcied that gdb.dwarf2/variant.exp does not mark the discriminant members as DW_AT_artificial. However, it should, as this is what the real Rust compiler does, and how the Rust language support is supposed to work. gdb/testsuite/ChangeLog 2020-03-11 Tom Tromey <tromey@adacore.com> * gdb.dwarf2/variant.exp: Mark discriminants as artificial.
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.dwarf2/variant.exp3
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d7de4e7..78505f1 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2020-03-11 Tom Tromey <tromey@adacore.com>
+
+ * gdb.dwarf2/variant.exp: Mark discriminants as artificial.
+
2020-03-11 Tom de Vries <tdevries@suse.de>
* gdb.base/foll-fork.exp: Allow "Reading in symbols" messages.
diff --git a/gdb/testsuite/gdb.dwarf2/variant.exp b/gdb/testsuite/gdb.dwarf2/variant.exp
index c0ae2e4..0250faf 100644
--- a/gdb/testsuite/gdb.dwarf2/variant.exp
+++ b/gdb/testsuite/gdb.dwarf2/variant.exp
@@ -91,6 +91,7 @@ Dwarf::assemble $asm_file {
discr_1_label: member {
{type :$uinteger_label}
{data_member_location 0 data1}
+ {artificial 1 DW_FORM_flag_present}
}
variant {
@@ -123,6 +124,7 @@ Dwarf::assemble $asm_file {
discr_2_label: member {
{type :$uinteger_label}
{data_member_location 0 data1}
+ {artificial 1 DW_FORM_flag_present}
}
variant {
@@ -172,6 +174,7 @@ Dwarf::assemble $asm_file {
discr_3_label: member {
{type :$int8_label}
{data_member_location 0 data1}
+ {artificial 1 DW_FORM_flag_present}
}
variant {