aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorNick Roberts <nickrob@snap.net.nz>2008-05-20 21:11:04 +0000
committerNick Roberts <nickrob@snap.net.nz>2008-05-20 21:11:04 +0000
commit79afeace624e7917961bb90d25ba32b415dacba1 (patch)
tree6dc3a03216f1a0f1e8807c1444dadfe31f3ca78a /gdb
parent55f996a73359f1068035614e7f32c2456bd408d8 (diff)
downloadgdb-79afeace624e7917961bb90d25ba32b415dacba1.zip
gdb-79afeace624e7917961bb90d25ba32b415dacba1.tar.gz
gdb-79afeace624e7917961bb90d25ba32b415dacba1.tar.bz2
Test for new annotation.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/gdb.base/annota1.exp39
1 files changed, 39 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index 94dc078..cd38c944 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -490,6 +490,45 @@ if [ regexp "core not found" $exec_output] {
}
}
+proc thread_test {} {
+ global objdir subdir srcdir
+ global gdb_prompt old_gdb_prompt
+ set testfile "watch_thread_num"
+ set srcfile ${testfile}.c
+ set binfile ${objdir}/${subdir}/${testfile}
+ set gdb_prompt $old_gdb_prompt
+
+ if { ![get_compiler_info ${binfile}] && [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] == "" } {
+
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ gdb_load ${binfile}
+ if { ![runto main] } then {
+ fail "run to main"
+ return
+ }
+
+ set gdb_prompt \
+ "\r\n\032\032pre-prompt\r\n$gdb_prompt \r\n\032\032prompt\r\n"
+
+ send_gdb "set annotate 2\n"
+ gdb_expect {
+ -re "set annotate 2\r\n$gdb_prompt$" {}
+ }
+
+ send_gdb "next 2\n"
+ gdb_expect {
+ -re ".*\032\032new-thread" {
+ pass "new thread"
+ }
+ timeout { fail "new thread (timeout)" }
+ }
+ }
+}
+
+thread_test
+
# restore the original prompt for the rest of the testsuite
set gdb_prompt $old_gdb_prompt