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: Joel Brobecker <brobecker at adacore dot com>
- To: Jie Zhang <jie dot zhang at analog dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 15 Dec 2008 11:52:28 +0400
- Subject: Re: Testsuite: Don't use global command in gdb_expect
- References: <4945F3EF.6050004@analog.com>
> 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 <jie.zhang@analog.com>
>
> * gdb.base/consecutive.exp: Don't use global in gdb_expect.
OK.
--
Joel