This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] More XFAILs for old GCCs after DW_AT_linkage_name


Hi,

my commit yesterday:
	[commit] Re: [patch] Follow DW_AT_linkage_name for methods #2
	http://sourceware.org/ml/gdb-patches/2011-07/msg00054.html

has caused more PASS->FAILs, all on old GCCs with broken DWARF with
non-matching DWARF structure vs. DW_AT_linkage_name, all these issues are
already fixed in gcc-4.6.  physname was forgiving incorrect DWARF in some
cases.

For gdb.cp/temargs.exp only "test type of Z in inner_m" was affected by
DW_AT_linkage_name, the other two changes were to fix and/or update the GDB
testsuite to the current state of GCC, tested with:
	gcc (GCC) 4.4.7 20110702 (prerelease)
	gcc (GCC) 4.5.4 20110702 (prerelease)
	gcc (GCC) 4.6.2 20110702 (prerelease)
	gcc (GCC) 4.7.0 20110702 (experimental)
Not verified with the real latest (4.4.6, 4.5.3, 4.6.1) real releases as I do
not have such builds handy.

The "test type of Z in inner_m" issues is again about wrong
DW_AT_linkage_name:

physname -> DW_AT_linkage_name:
 whatis Z
-type = float
-(gdb) PASS: gdb.cp/temargs.exp: test type of Z in inner_m
+No symbol "Z" in current context.
+(gdb) FAIL: gdb.cp/temargs.exp: test type of Z in inner_m

FAIL:
    < c>   DW_AT_producer    : GNU C++ 4.5.4 20110702 (prerelease)
 <1><112>: Abbrev Number: 10 (DW_TAG_structure_type)
    <113>   DW_AT_name        : Inner<float>
 <2><11e>: Abbrev Number: 11 (DW_TAG_template_type_param)
    <11f>   DW_AT_name        : Z
 <2><125>: Abbrev Number: 4 (DW_TAG_subprogram)
    <127>   DW_AT_name        : inner_m
    <12d>   DW_AT_MIPS_linkage_name: _ZN4BaseIlLi47EXadL_Z8a_globalEEXadL_ZN1S1fEEEE5InnerIfE7inner_mEv
                                   = Base<long, 47, &a_global, &(S::f)>::Inner<float>::inner_m()

PASS:
    < c>   DW_AT_producer    : GNU C++ 4.6.2 20110702 (prerelease)
 <1><106>: Abbrev Number: 10 (DW_TAG_structure_type)
    <107>   DW_AT_name        : Base<long int, 47, (& a_global), &S::f>
 <2><112>: Abbrev Number: 10 (DW_TAG_structure_type)
    <113>   DW_AT_name        : Inner<float>
 <3><11e>: Abbrev Number: 11 (DW_TAG_subprogram)
    <120>   DW_AT_name        : inner_m
    <126>   DW_AT_MIPS_linkage_name: _ZN4BaseIlLi47EXadL_Z8a_globalEEXadL_ZN1S1fEEEE5InnerIfE7inner_mEv
                                   = Base<long, 47, &a_global, &(S::f)>::Inner<float>::inner_m()
 <3><13a>: Abbrev Number: 12 (DW_TAG_template_type_param)
    <13b>   DW_AT_name        : Z


Thanks,
Jan


http://sourceware.org/ml/gdb-cvs/2011-07/msg00036.html

--- src/gdb/testsuite/ChangeLog	2011/07/02 12:08:44	1.2778
+++ src/gdb/testsuite/ChangeLog	2011/07/02 15:13:12	1.2779
@@ -1,7 +1,11 @@
 2011-07-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	* gdb.cp/m-static.exp: Call get_compiler_info.
-	(static const int initialized nowhere): Call setup_xfail for gcc<=4.4.
+	(static const int initialized nowhere): Call setup_xfail for gcc <= 4.4.
+	* gdb.cp/pr9167.exp (p b): Likewise.
+	* gdb.cp/temargs.exp: Do not set have_pr_45024_fixed for gcc 4.6.
+	(test value of P in inner_m, test type of Z in inner_m): Call
+	setup_xfail for gcc <= 4.5.
 
 2011-07-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
--- src/gdb/testsuite/gdb.cp/pr9167.exp	2011/01/01 15:33:44	1.3
+++ src/gdb/testsuite/gdb.cp/pr9167.exp	2011/07/02 15:13:13	1.4
@@ -32,5 +32,12 @@
 gdb_breakpoint [gdb_get_line_number "marker"]
 gdb_continue_to_breakpoint "marker"
 
+if {[test_compiler_info {gcc-[0-3]-*}]
+    || [test_compiler_info {gcc-4-[0-4]-*}]} {
+    # There was an extra CU-level DW_TAG_variable for DEFAULT_INSTANCE
+    # as DW_AT_declaration with DW_AT_name = nowhere
+    # and DW_AT_MIPS_linkage_name = _ZN9gnu_obj_47nowhereE .
+    setup_xfail *-*-*
+}
 gdb_test "p b" "{<A<int, B>> = {<ATB<int>> = {data = 0}, static DEFAULT_INSTANCE = <optimized out>}, <No data fields>}"
 
--- src/gdb/testsuite/gdb.cp/temargs.exp	2011/07/01 19:12:12	1.6
+++ src/gdb/testsuite/gdb.cp/temargs.exp	2011/07/02 15:13:13	1.7
@@ -51,8 +51,6 @@
 } elseif {[test_compiler_info {gcc-4-5-*}]} {
     set have_pr_41736_fixed 0
     set have_pr_45024_fixed 0
-} elseif {[test_compiler_info {gcc-4-6-*}]} {
-    set have_pr_45024_fixed 0
 }
 
 set line [gdb_get_line_number "Breakpoint 1" $srcfile]
@@ -110,13 +108,23 @@
 if {!$have_pr_45024_fixed} { setup_xfail *-*-* }
 gdb_test "print I" " = 47" "test value of I in inner_m"
 
-if $have_older_template_gcc { setup_xfail "*-*-*" }
+if $have_older_template_gcc { setup_xfail "*-*-*"
+} elseif {[test_compiler_info {gcc-[0-3]-*}]
+	 || [test_compiler_info {gcc-4-[0-5]-*}]} {
+  # gcc-4.5.x still does not emit inner DW_TAG_structure_type.
+  setup_xfail "*-*-*"
+}
 gdb_test "print P == &a_global" " = true" "test value of P in inner_m"
 
 if {!$have_pr_41736_fixed} { setup_xfail *-*-* }
 gdb_test "print MP" "&S::f" "test value of MP in inner_m"
 
-if $have_older_template_gcc { setup_xfail "*-*-*" }
+if $have_older_template_gcc { setup_xfail "*-*-*"
+} elseif {[test_compiler_info {gcc-[0-3]-*}]
+	 || [test_compiler_info {gcc-4-[0-5]-*}]} {
+  # gcc-4.5.x still does not emit outer DW_TAG_structure_type.
+  setup_xfail "*-*-*"
+}
 gdb_test "whatis Z" "float" "test type of Z in inner_m"
 
 #


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]