Fix two buglets in cp_print_value_fields patch
authorTom Tromey <tromey@adacore.com>
Tue, 18 Jun 2019 15:37:02 +0000 (09:37 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 27 Jun 2019 13:51:52 +0000 (07:51 -0600)
Pedro and Tom both pointed out issues in the cp_print_value_fields
patch, aka the fix for PR c++/20020.

This patch addresses both issues.  Tested on x86-64 Fedora 29.

gdb/ChangeLog
2019-06-27  Tom Tromey  <tromey@adacore.com>

* cp-valprint.c (cp_print_value_fields): Pass opts, not options,
to cp_print_static_field.

gdb/testsuite/ChangeLog
2019-06-27  Tom Tromey  <tromey@adacore.com>

* gdb.cp/constexpr-field.exp: Use setup_xfail.

gdb/ChangeLog
gdb/cp-valprint.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.cp/constexpr-field.exp

index f06d13e69dd331061551914ba4615dc0fdb1eeb0..28a0df36dba2b4ccb0d40d34924c84d2958caec7 100644 (file)
@@ -1,3 +1,8 @@
+2019-06-27  Tom Tromey  <tromey@adacore.com>
+
+       * cp-valprint.c (cp_print_value_fields): Pass opts, not options,
+       to cp_print_static_field.
+
 2019-06-26  Tom Tromey  <tromey@adacore.com>
 
        * minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove.
index 5781d7ab56141aab72e4e0c477a544ef42c089ed..d3a38d885d86639044420d9112a048a9a6d15b71 100644 (file)
@@ -302,7 +302,7 @@ cp_print_value_fields (struct type *type, struct type *real_type,
 
                      cp_print_static_field (TYPE_FIELD_TYPE (type, i),
                                             v, stream, recurse + 1,
-                                            options);
+                                            opts);
                    }
                  catch (const gdb_exception_error &ex)
                    {
index 10a38a2666f185e1fb4e3aabd5dbe331520a9cef..2347a4ad038a235ecbade82b0e66b8593a262889 100644 (file)
@@ -1,3 +1,7 @@
+2019-06-27  Tom Tromey  <tromey@adacore.com>
+
+       * gdb.cp/constexpr-field.exp: Use setup_xfail.
+
 2019-06-26  Tom de Vries  <tdevries@suse.de>
 
        * gdb.dwarf2/varval.exp: Compile twice, once without bad DWARF.
index e4849efeae9f243b4b243a8b091bf13a2f69df54..2f71cef952a93210259ed3bd2292094fe7a1968b 100644 (file)
@@ -31,6 +31,7 @@ if {![runto_main]} {
 
 # "x" sometimes isn't available due to
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90526
-gdb_test "print x" " = {static f = .*}"
+setup_xfail *-*-* gcc/90526
+gdb_test "print x" " = {static f = true}"
 
 gdb_test "print y" " = {static f = true}"
This page took 0.035336 seconds and 4 git commands to generate.