This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Fix gdb.threads/thread-find.exp for remote targets
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 4 Aug 2011 14:55:02 +0200 (CEST)
- Subject: [commit] Fix gdb.threads/thread-find.exp for remote targets
Hello,
gdb.threads/thread-find.exp may fail on remote targets because they
not already report thread creation events early enough. Add a call
to info threads to ensure thread info is available when needed.
Tested on arm-linux-gnueabi.
Committed to mainline.
Bye,
Ulrich
ChangeLog:
* gdb.threads/thread-find.exp: Support remote targets.
Index: gdb/testsuite/gdb.threads/thread-find.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/thread-find.exp,v
retrieving revision 1.4
diff -u -p -r1.4 thread-find.exp
--- gdb/testsuite/gdb.threads/thread-find.exp 22 Feb 2011 18:51:27 -0000 1.4
+++ gdb/testsuite/gdb.threads/thread-find.exp 4 Aug 2011 12:48:11 -0000
@@ -38,6 +38,10 @@ runto_main
gdb_breakpoint [gdb_get_line_number "linuxthreads.exp: info threads 2"]
gdb_continue_to_breakpoint "main thread's sleep"
+# Make sure thread list is up-to-date (in case remote targets have not yet
+# reported thread creation events)
+gdb_test "info threads"
+
# Create thread names.
gdb_test "thread apply 1 thread name threadname_1" \
"Thread 1 .*" \
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com