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]

[RFA] testsuite avoid tcl error in gdb.threads/gcore-thread.exp

  I get a tcl error on gdb.threads/gcore-thread.exp
because cygwin fails before, and the program exits
earlier than expected.
  When the test which is supposed
to set core_supported variable, no of the two variants is output,
but instead I get a message that I can't do this
without a running process.

gcore /usr/local/src/gdbcvs/build-norm/gdb/testsuite/gdb.threads/gcore.test
You can't do that without a process to debug.

  This results in the fact that the core_supported variable is
not set, and the
if {!$core_supported}
issues a tcl ERROR.

  The patch below, set core_supported to `0' before
testing for support at global level.
  Tested on gcc16 (it works again, hurrah!)
no changes.

  OK to commit?

Pierre Muller
Pascal language support maintainer for GDB


 2010-06-23  Pierre Muller  <>

	* gcore-thread.exp (core_supported): Initialize variable to zero
	at global scope.
	(gdb_test_multiple): Only set CORE_SUPPORTED if test passes.

Index: src/gdb/testsuite/gdb.threads/gcore-thread.exp
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/gcore-thread.exp,v
retrieving revision 1.17
diff -u -p -r1.17 gcore-thread.exp
--- src/gdb/testsuite/gdb.threads/gcore-thread.exp	2 Jun 2010 19:58:21
-0000	1.17
+++ src/gdb/testsuite/gdb.threads/gcore-thread.exp	23 Jun 2010 13:16:20
@@ -94,6 +94,9 @@ gdb_test "continue" "Continuing.*Breakpo
 set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
 # Drop corefile
+global core_supported
+set core_supported 0
 gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
 	"save a corefile" \
@@ -104,12 +107,9 @@ gdb_test_multiple "gcore ${objdir}/${sub
   -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
     unsupported "save a corefile"
-    global core_supported
-    set core_supported 0
-global core_supported
 if {!$core_supported} {
   return -1

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