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] New XFAIL for gcc<=4.4 gdb.cp/m-static.exp: static const int initialized nowhere


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 a PASS->FAIL regression for:
	gdb.cp/m-static.exp: static const int initialized nowhere

on FSF GCC 4.4 (expecting <=4.4):

 print test4.nowhere
-field nowhere is nonexistent or has been optimized out
-(gdb) PASS: gdb.cp/m-static.exp: static const int initialized nowhere
+Address of symbol "gnu_obj_4::nowhere" is unknown.
+(gdb) FAIL: gdb.cp/m-static.exp: static const int initialized nowhere

FAIL:
    < c>   DW_AT_producer    : GNU C++ 4.4.7 20110702 (prerelease)
 <1><10e>: Abbrev Number: 4 (DW_TAG_class_type)
    <10f>   DW_AT_name        : gnu_obj_4
 <2><12b>: Abbrev Number: 15 (DW_TAG_variable)
    <12c>   DW_AT_name        : nowhere
    <132>   DW_AT_MIPS_linkage_name: _ZN9gnu_obj_47nowhereE
    <13a>   DW_AT_external    : 1
    <13b>   DW_AT_declaration : 1
 <1><718>: Abbrev Number: 3 (DW_TAG_variable)
    <719>   DW_AT_name        : nowhere
    <71f>   DW_AT_MIPS_linkage_name: _ZN9gnu_obj_47nowhereE
    <727>   DW_AT_external    : 1
    <728>   DW_AT_declaration : 1

PASS:
    < c>   DW_AT_producer    : GNU C++ 4.5.4 20110702 (prerelease)
 <1><119>: Abbrev Number: 4 (DW_TAG_class_type)
    <11a>   DW_AT_name        : gnu_obj_4
 <2><136>: Abbrev Number: 16 (DW_TAG_member)
    <137>   DW_AT_name        : nowhere
    <13d>   DW_AT_MIPS_linkage_name: _ZN9gnu_obj_47nowhereE
    <145>   DW_AT_external    : 1
    <146>   DW_AT_declaration : 1

I see why physname ignored that DIE <0x718> while DW_AT_MIPS_linkage_name
following code now is mistaken by the bogus GCC DWARF output.

I haven't tried to bisect the GCC PR which fixed it so I just XFAILed it.

Checked it in.


Thanks,
Jan


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

--- src/gdb/testsuite/ChangeLog	2011/07/01 20:27:59	1.2777
+++ src/gdb/testsuite/ChangeLog	2011/07/02 12:08:44	1.2778
@@ -1,3 +1,8 @@
+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.
+
 2011-07-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
 	* gdb.cp/paren-type.cc: New files.
--- src/gdb/testsuite/gdb.cp/m-static.exp	2011/01/01 15:33:43	1.14
+++ src/gdb/testsuite/gdb.cp/m-static.exp	2011/07/02 12:08:44	1.15
@@ -52,6 +52,10 @@
      return -1
 }
 
+if [get_compiler_info $binfile] {
+    return -1
+}
+
 gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
@@ -126,6 +130,13 @@
 gdb_test "print test4.elsewhere" "\\$\[0-9\].* = 221" "static const int initialized elsewhere"
 
 # static const int that nobody initializes.  From PR gdb/635.
+if {[test_compiler_info {gcc-[0-3]-*}]
+    || [test_compiler_info {gcc-4-[0-4]-*}]} {
+    # There was an extra CU-level DW_TAG_variable as DW_AT_declaration
+    # with DW_AT_name = nowhere
+    # and DW_AT_MIPS_linkage_name = _ZN9gnu_obj_47nowhereE .
+    setup_xfail *-*-*
+}
 gdb_test "print test4.nowhere" "field nowhere is nonexistent or has been optimized out" "static const int initialized nowhere"
 
 # static const initialized in the class definition, PR gdb/11702.


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