[gdb/testsuite] Fix set $var val in gdb.dwarf2/dw2-is-stmt.exp
When doing a testrun with:
...
$ make check RUNTESTFLAGS=$(cd $src/gdb/testsuite/; echo gdb.dwarf2/*.exp)
...
I ran into:
...
ERROR: tcl error sourcing gdb.dwarf2/dw2-is-stmt.exp.
ERROR: expected integer but got "dw2-abs-hi-pc-world.c"
while executing
"incr i"
...
The variable i is set in gdb.dwarf2/dw2-abs-hi-pc.exp, and leaks to
gdb.dwarf2/dw2-is-stmt.exp. It's not removed by gdb_cleanup_globals because i
is set as global variable by runtest.exp, which does:
...
for { set i 0 } { $i < $argc } { incr i } {
...
at toplevel but forgets to unset the variable.
Fix this by removing '$' in front of the variable name when doing set:
...
-set $i 0
+set i 0
...
Tested on x86_64-linux.