gdb.threads/thread-specific.exp: Fix uninitialized variable references
This fixes:
FAIL: gdb.threads/thread-specific.exp: continue to thread-specific breakpoint (timeout)
ERROR: tcl error sourcing .../gdb/testsuite/gdb.threads/thread-specific.exp.
ERROR: can't read "this_breakpoint": no such variable
while executing
"gdb_test_multiple "info breakpoint $this_breakpoint" "info on bp" {
-re ".*stop only in thread (\[0-9\]*).*$gdb_prompt $" {
set this_thread $expe..."
(file ".../gdb/testsuite/gdb.threads/thread-specific.exp" line 108)
invoked from within
"source .../gdb/testsuite/gdb.threads/thread-specific.exp"
("uplevel" body line 1)
invoked from within
"uplevel #0 source .../gdb/testsuite/gdb.threads/thread-specific.exp"
invoked from within
"catch "uplevel #0 source $test_file_name""
and then:
FAIL: gdb.threads/thread-specific.exp: continue to thread-specific breakpoint (timeout)
UNTESTED: gdb.threads/thread-specific.exp: info on bp
ERROR: tcl error sourcing .../gdb/testsuite/gdb.threads/thread-specific.exp.
ERROR: can't read "this_thread": no such variable
while executing
"gdb_test {print $_thread} ".* = $this_thread" "thread var at break""
(file ".../gdb/testsuite/gdb.threads/thread-specific.exp" line 119)
invoked from within
"source .../gdb/testsuite/gdb.threads/thread-specific.exp"
("uplevel" body line 1)
invoked from within
"uplevel #0 source .../gdb/testsuite/gdb.threads/thread-specific.exp"
invoked from within
"catch "uplevel #0 source $test_file_name""
Final results:
FAIL: gdb.threads/thread-specific.exp: continue to thread-specific breakpoint (timeout)
UNTESTED: gdb.threads/thread-specific.exp: info on bp
UNTESTED: gdb.threads/thread-specific.exp: thread var at break
Of course the first failure best wasn't there, but failing that the script
shouldn't crash.
* gdb.threads/thread-specific.exp: Handle the lack of usable
$this_breakpoint and $this_thread.