This is the mail archive of the gdb-patches@sources.redhat.com 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]

[patch/testsuite] structs.exp, call get_debug_format


Here is a buglet fix for structs.exp.  structs.exp was using the debug
format without ever calling get_debug_format.  This works if structs.exp
is run with the whole test suite, but does not work if structs.exp is
run by itself with "RUNTESTFLAGS=structs.exp".

The difference shows up with gcc 3.3.2 -gdwarf-2.

This patch is obvious; also, Andrew C pre-approved it on another
mailing list.

Testing: I ran the whole test suite before and after the change,
and I also ran with "RUNTESTFLAGS=structs.exp", with several
configurations:

  gcc 2.95.3, dwarf-2
  gcc 2.95.3, stabs+
  gcc 3.2-7-rh, dwarf-2
  gcc 3.2-7-rh, stabs+
  gcc 3.3.2, dwarf-2
  gcc 3.3.2, stabs+
  gcc HEAD, dwarf-2
  gcc HEAD, stabs+

I am committing this now.

Michael C

2003-11-23  Michael Chastain  <mec@shout.net>

	Fix PR testsuite/1463.
	* gdb.base/structs.exp (start_structs_test): Call
	get_debug_format before using the debug format.

Index: gdb.base/structs.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/structs.exp,v
retrieving revision 1.9
diff -c -3 -p -r1.9 structs.exp
*** gdb.base/structs.exp	20 Nov 2003 18:03:48 -0000	1.9
--- gdb.base/structs.exp	23 Nov 2003 05:17:00 -0000
*************** proc start_structs_test { types } {
*** 98,103 ****
--- 98,106 ----
  	gdb_suppress_tests;
      }
  
+     # Get the debug format
+     get_debug_format
+ 
      # check that at the struct containing all the relevant types is correct
      set foo_t "type = struct struct[llength ${types}] \{"
      for {set n 0} {$n<[llength ${types}]} {incr n} {


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