[commit/testsuite/obvious] complex.exp: use test_compiler_info

Michael Elizabeth Chastain mec.gnu@mindspring.com
Sun Nov 30 06:41:00 GMT 2003


Here is my nightly test_compiler_info cleanup patch.

Testing: tested with gcc 2.95.3 and 3.3.2, dwarf-2 and stabs+.

I also checked out the setup_xfail.  It's for real.  gcc 2.95.3
-gdwarf-2 generates bad debug info for a structure like this:

  struct
  {
    char c;
    __complex_ float f;
  };

The structure is 9 bytes long, but the debug info is for a 12-byte
structure, as if there is padding between "char c" and "__complex__
float f".

gcc 3.3.2 -dwarf-2 works fine and it's pointless to file a bug report
against gcc 2.95.3.  I just thought I'd mention this.

I am committing this now as an obvious fix.

Michael C

2003-11-29  Michael Chastain  <mec.gnu@mindspring.com>

	Partial fix for PR testsuite/1456.
	* gdb.base/complex.exp: Replace reference to gcc_compiled with
	call to test_compiler_info.

Index: gdb.base/complex.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/complex.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 complex.exp
*** gdb.base/complex.exp	29 Jun 2003 20:32:23 -0000	1.1
--- gdb.base/complex.exp	30 Nov 2003 06:34:10 -0000
*************** gdb_load $binfile
*** 48,54 ****
  
  if [runto f2] then {
      get_debug_format
!     if {$gcc_compiled == 2 && [test_debug_format "DWARF 2"]} then {
  	setup_xfail "*-*-*"
      }
      gdb_test "p *y" "\\\$\[0-9\]* = \{c = 42 '\\*', f = 1 \\+ 0 \\* I\}" \
--- 48,54 ----
  
  if [runto f2] then {
      get_debug_format
!     if { [test_compiler_info gcc-2-*] && [test_debug_format "DWARF 2"] } then {
  	setup_xfail "*-*-*"
      }
      gdb_test "p *y" "\\\$\[0-9\]* = \{c = 42 '\\*', f = 1 \\+ 0 \\* I\}" \



More information about the Gdb-patches mailing list