From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29376 invoked by alias); 15 Dec 2008 07:53:13 -0000 Received: (qmail 29365 invoked by uid 22791); 15 Dec 2008 07:53:13 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Dec 2008 07:52:38 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 58B5C2A95F0; Mon, 15 Dec 2008 02:52:36 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id lPkjnXtUiEQ3; Mon, 15 Dec 2008 02:52:36 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id DD59F2A95C1; Mon, 15 Dec 2008 02:52:35 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 9F95BE7ACD; Mon, 15 Dec 2008 08:52:28 +0100 (CET) Date: Mon, 15 Dec 2008 07:53:00 -0000 From: Joel Brobecker To: Jie Zhang Cc: gdb-patches@sourceware.org Subject: Re: Testsuite: Don't use global command in gdb_expect Message-ID: <20081215075228.GK6866@adacore.com> References: <4945F3EF.6050004@analog.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4945F3EF.6050004@analog.com> User-Agent: Mutt/1.4.2.2i 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: 2008-12/txt/msg00271.txt.bz2 > The Tcl global command has no effect unless executed in the context of > a proc body. So the global commands in the following code are > useless. Verified in the Tcl 8.4 documentation. > Even worse, they would cause unexpected result. When gdb_expect gets > something containing "global", it will try to execute hex as a command, > which will cause an error. I'm wondering how this is happening, though. I presume that the test was working when the testcase was added by the original author... It's working for me too, actually. That being said, these are only side questions. The patch looks correct to me. > 2008-12-15 Jie Zhang > > * gdb.base/consecutive.exp: Don't use global in gdb_expect. OK. -- Joel