This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] testsuite avoid tcl error in gdb.threads/gcore-thread.exp
- From: Doug Evans <dje at google dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: Pedro Alves <pedro at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Sat, 26 Jun 2010 10:16:09 -0700
- Subject: Re: [RFA] testsuite avoid tcl error in gdb.threads/gcore-thread.exp
- References: <201006231542.12328.pedro@codesourcery.com> <5627205469024062490@unknownmsgid>
On Wed, Jun 23, 2010 at 8:31 AM, Pierre Muller
<pierre.muller@ics-cnrs.unistra.fr> wrote:
>> Pedantically, you don't need that "global" statement anymore.
>
> ?I still didn't really understand this:
> ?when I run a testsuite with
> 'make check'.
> All individual tests are run from runtest script
> which itself uses runtest procedure to execute
> each .exp file using the source command.
> ?Thus I was thinking that the code
> inside each .exp ?file was not at global level,
> but only at 'runtest procedure level', and I am not even sure
> which level that procedure runs.
> ?Could someone explain to me why we are for sure
> at global level when a .exp file is sourced?
Because runtest invokes the .exp file as:
if { [catch "uplevel #0 source $test_file_name"] == 1 } {