This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Testsuite: Don't use global command in gdb_expect


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 <jie.zhang@analog.com>

* gdb.base/consecutive.exp: Don't use global in gdb_expect.

OK.


Committed. Thanks.


Jie



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]