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: [RFA] testsuite avoid tcl error in gdb.threads/gcore-thread.exp


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 } {


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