This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Testsuite: Don't use global command in gdb_expect
- From: Michael Snyder <msnyder at vmware dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Jie Zhang <jie dot zhang at analog dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 18 Dec 2008 11:52:12 -0800
- Subject: Re: Testsuite: Don't use global command in gdb_expect
- References: <4945F3EF.6050004@analog.com> <20081215075228.GK6866@adacore.com>
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.
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...
That would be me, I think.
I probably did not understand the issue, and I support
whatever solution you two arrive at. ;-)
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 <jie.zhang@analog.com>
* gdb.base/consecutive.exp: Don't use global in gdb_expect.
OK.