From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4551 invoked by alias); 15 Dec 2008 13:16:05 -0000 Received: (qmail 4541 invoked by uid 22791); 15 Dec 2008 13:16:04 -0000 X-Spam-Check-By: sourceware.org Received: from nwd2mail10.analog.com (HELO nwd2mail10.analog.com) (137.71.25.55) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Dec 2008 13:15:25 +0000 X-IronPort-AV: E=Sophos;i="4.36,224,1228107600"; d="scan'208";a="79798147" Received: from nwd2mhb2.analog.com ([137.71.6.12]) by nwd2mail10.analog.com with ESMTP; 15 Dec 2008 08:15:23 -0500 Received: from nwd2exm4.ad.analog.com (nwd2exm4.ad.analog.com [10.64.53.123]) by nwd2mhb2.analog.com (8.9.3 (PHNE_28810+JAGae91741)/8.9.3) with ESMTP id IAA17350; Mon, 15 Dec 2008 08:15:25 -0500 (EST) Received: from chinexm1.ad.analog.com ([10.99.27.42]) by nwd2exm4.ad.analog.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 15 Dec 2008 08:15:23 -0500 Received: from [192.168.2.125] ([10.99.29.116]) by chinexm1.ad.analog.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 15 Dec 2008 21:14:15 +0800 Message-ID: <49465818.9060703@analog.com> Date: Mon, 15 Dec 2008 13:16:00 -0000 From: Jie Zhang User-Agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018) MIME-Version: 1.0 To: Joel Brobecker CC: gdb-patches@sourceware.org Subject: Re: Testsuite: Don't use global command in gdb_expect References: <4945F3EF.6050004@analog.com> <20081215075228.GK6866@adacore.com> In-Reply-To: <20081215075228.GK6866@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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/msg00280.txt.bz2 Hi Joel, Joel Brobecker wrote: >> 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. > Yeah. The first sentence was just copied from Tcl 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. > I'm working on the Blackfin port of GDB. Blackfin disassembler has a feature to guess the register value and output it in a comment beside the disassembling output of instruction. It also outputs a symbol if one can be found which matches the value. Unfortunately, the symbol found in this test case contains "global" as a substring, which caused the issue. > 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. > Committed. Thanks. Jie