This is the mail archive of the 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] Handle valgrind failures more gracefully


I'm getting DejaGNU errors in gdb.base/valgrind-db-attach.exp
because my ppc64 valgrind refuses to start with an error:
valgrind: wrong ELF executable class (eg. 32-bit instead of 64-bit)
when runnning the testsuite in spu or ppc32 mode.

The following patch makes the test fail more gracefully as
simply UNSUPPORTED in such situations.

Tested on spu-elf, committed to mainline.



	* gdb.base/valgrind-db-attach.exp: Fail gracefully if valgrind
	does not support ELF executable class.

Index: gdb/testsuite/gdb.base/valgrind-db-attach.exp
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/valgrind-db-attach.exp,v
retrieving revision 1.4
diff -u -p -r1.4 valgrind-db-attach.exp
--- gdb/testsuite/gdb.base/valgrind-db-attach.exp	8 Jun 2010 22:58:03 -0000	1.4
+++ gdb/testsuite/gdb.base/valgrind-db-attach.exp	11 Jun 2010 23:23:34 -0000
@@ -51,6 +51,10 @@ gdb_test_multiple "" $test {
 	unsupported $test
 	return -1
+    -re "valgrind: wrong ELF executable class" {
+	unsupported $test
+	return -1
+    }
     -re "command not found" {
 	# The spawn succeeded, but then valgrind was not found - e.g. if
 	# we spawned SSH to a remote system.

  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE

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