This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [committed, testsuite] Reapply fix for gdb.cp/var-tag.exp C++ failures
- From: Keith Seitz <keiths at redhat dot com>
- To: Sandra Loosemore <sandra at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Thu, 30 Jul 2015 13:56:44 -0700
- Subject: Re: [committed, testsuite] Reapply fix for gdb.cp/var-tag.exp C++ failures
- Authentication-results: sourceware.org; auth=none
- References: <55BA74C2 dot 8050800 at codesourcery dot com>
On 07/30/2015 12:02 PM, Sandra Loosemore wrote:
> FAIL: gdb.cp/var-tag.exp: before start: c++: ptype E
> FAIL: gdb.cp/var-tag.exp: before start: c++: ptype ee
> FAIL: gdb.cp/var-tag.exp: before start: c++: ptype EE
> FAIL: gdb.cp/var-tag.exp: before start: c++: ptype E2
> FAIL: gdb.cp/var-tag.exp: in main: c++: ptype E
> FAIL: gdb.cp/var-tag.exp: in main: c++: ptype ee
> FAIL: gdb.cp/var-tag.exp: in main: c++: ptype EE
> FAIL: gdb.cp/var-tag.exp: in main: c++: ptype E2
> FAIL: gdb.cp/var-tag.exp: in C::f: c++: ptype E
> FAIL: gdb.cp/var-tag.exp: in C::f: c++: ptype ee
> FAIL: gdb.cp/var-tag.exp: in C::f: c++: ptype EE
> FAIL: gdb.cp/var-tag.exp: in C::f: c++: ptype E2
Yeah, GCC5 is now outputting (into DWARF) the underlying types used to
implement the enum. I had a patch lying around, but I forgot about it.
Thank you for doing this.
> diff --git a/gdb/testsuite/gdb.cp/var-tag.exp b/gdb/testsuite/gdb.cp/var-tag.exp
> index 30aab99..60379e9 100644
> --- a/gdb/testsuite/gdb.cp/var-tag.exp
> +++ b/gdb/testsuite/gdb.cp/var-tag.exp
> @@ -28,13 +28,18 @@ if {[prepare_for_testing $testfile.exp $testfile \
>
> proc do_global_tests {lang} {
> set invalid_print "Attempt to use a type name as an expression"
> - set ptypefmt "type = (class|enum|union|struct) %s {.*}"
> +
> + if {$lang == "c++"} {
> + set opt_underlying "(: unsigned int )?"
> + } else {
> + set opt_underlying ""
Missing '}' ?
> + set ptypefmt "type = (class|enum|union|struct) %s $opt_underlying{.*}"
Keith