exists before using it.
(check_mi_and_console_threads): Likewise.
* gdb669.exp (get_mi_thread_list): Likewise.
(check_mi_and_console_threads): Likewise.
+2002-09-25 Keith Seitz <keiths@redhat.com>
+
+ * mi-pthreads.exp (get_mi_thread_list): Check if expect_out
+ exists before using it.
+ (check_mi_and_console_threads): Likewise.
+ * gdb669.exp (get_mi_thread_list): Likewise.
+ (check_mi_and_console_threads): Likewise.
+
2002-09-24 Keith Seitz <keiths@redhat.com>
* configure.in: Add config header.
{\^done,thread-ids={(thread-id="[0-9]+"(,)?)+},number-of-threads="[0-9]+"} \
"-thread_list_ids ($name)"
+ set output {}
+ if {[info exists expect_out(buffer)]} {
+ set output $expect_out(buffer)
+ }
set thread_list {}
- if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $expect_out(buffer) threads]} {
+ if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $output threads]} {
fail "finding threads in MI output ($name)"
} else {
pass "finding threads in MI output ($name)"
mi_gdb_test "-thread-list-ids" \
{\^done,thread-ids={(thread-id="[0-9]+"(,)*)+},number-of-threads="[0-9]+"} \
"-thread-list-ids ($name)"
- set mi_output $expect_out(buffer)
+ set mi_output {}
+ if {[info exists expect_out(buffer)]} {
+ set mi_output $expect_out(buffer)
+ }
# GDB will return a list of thread ids and some more info:
#
mi_gdb_test "info threads" \
{.*(~".*"[\r\n]*)+.*} \
"info threads ($name)"
- set console_output $expect_out(buffer)
+ set console_output {}
+ if {[info exists expect_out(buffer)]} {
+ set console_output $expect_out(buffer)
+ }
# Make a list of all known threads to console (gdb's thread IDs)
set console_thread_list {}
{\^done,thread-ids={(thread-id="[0-9]+"(,)?)+},number-of-threads="[0-9]+"} \
"-thread_list_ids ($name)"
+ set output {}
+ if {[info exists expect_out(buffer)]} {
+ set output $expect_out(buffer)
+ }
+
set thread_list {}
- if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $expect_out(buffer) threads]} {
+ if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $output threads]} {
fail "finding threads in MI output ($name)"
} else {
pass "finding threads in MI output ($name)"
mi_gdb_test "-thread-list-ids" \
{\^done,thread-ids={(thread-id="[0-9]+"(,)*)+},number-of-threads="[0-9]+"} \
"-thread-list-ids ($name)"
- set mi_output $expect_out(buffer)
+ set mi_output {}
+ if {[info exists expect_out(buffer)]} {
+ set mi_output $expect_out(buffer)
+ }
# GDB will return a list of thread ids and some more info:
#
mi_gdb_test "info threads" \
{.*(~".*"[\r\n]*)+.*} \
"info threads ($name)"
- set console_output $expect_out(buffer)
+ set console_output {}
+ if {[info exists $expect_out(buffer)]} {
+ set console_output $expect_out(buffer)
+ }
# Make a list of all known threads to console (gdb's thread IDs)
set console_thread_list {}