This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFC] switch-threads.exp added tests.
- From: Manoj Iyer <manjo at austin dot ibm dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 14 Jun 2005 14:35:05 -0500 (CDT)
- Subject: [RFC] switch-threads.exp added tests.
I added couple of tests to explicitly test switching threads. Any
comments/suggestion?
2005-06-14 Manoj Iyer <manjo@austin.ibm.com>
* gdb.base/switch-threads.exp: Added test explicitly changing threads.
--------------------------------------------------------------
--- ./switch-threads.exp 2003-10-09 14:49:28.000000000 -0500
+++ /tmp/switch-threads.exp 2005-06-14 14:01:15.000000000 -0500
@@ -24,8 +24,6 @@
# multi-threaded stubs to reliably get this correct; gdbserver defaulted
# to the first thread.
-# TODO: we should also test explicitly changing threads with the "thread"
-# command.
if $tracelevel then {
strace $tracelevel
@@ -49,4 +47,7 @@ runto_main
gdb_breakpoint thread_func
gdb_continue_to_breakpoint "continue to thread_func"
gdb_test "next" ".*foo \\(\\);"
-
+gdb_test "info threads" "\\* .*2 Thread.*.LWP.* .*thread_func.*"
+gdb_test "thread 1" ".*Switching to thread 1.*"
+gdb_test "next" ".*foo \\(\\).*\[0-9\]*"
+gdb_test "thread 2" ".*Switching to thread 2.*"
-----
manjo
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cogito ergo sum +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++