From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10484 invoked by alias); 23 Jun 2010 13:59:09 -0000 Received: (qmail 10472 invoked by uid 22791); 23 Jun 2010 13:59:07 -0000 X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=AWL,BAYES_00,MSGID_MULTIPLE_AT,RCVD_IN_JMF_BL X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.152) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Jun 2010 13:59:01 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o5NDwwMH001100 for ; Wed, 23 Jun 2010 15:58:58 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms7.u-strasbg.fr [IPv6:2001:660:2402:d::16]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o5NDwvKc056232 for ; Wed, 23 Jun 2010 15:58:57 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o5NDwuuY072058 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Wed, 23 Jun 2010 15:58:56 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: Subject: [RFA] testsuite avoid tcl error in gdb.threads/gcore-thread.exp Date: Wed, 23 Jun 2010 13:59:00 -0000 Message-ID: <000901cb12dc$40c1f830$c245e890$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00497.txt.bz2 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 -0000 @@ -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 }