This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Remove printf from gdb.threads/manythreads.c
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Thu, 1 Nov 2012 16:27:50 +0800
- Subject: [PATCH] Remove printf from gdb.threads/manythreads.c
Hi,
When debugging a fail in manythreads.exp, I find manythreads prints
many lines that make the gdb.log unreadable. It is useless to print
something in inferior because the output is invisible to dejagnu when
doing remote testing with gdbserver. It is also improper to match
inferior's output in manythreads.exp. This patch is to remove the
printf in manythreads.c and don't match its output in manythreads.exp.
Is it OK?
gdb/testsuite:
2012-11-01 Yao Qi <yao@codesourcery.com>
* gdb.threads/manythreads.c: Remove including file 'stdio.h'.
(thread_function): Remove call printf.
* gdb.threads/manythreads.exp: Remove a pattern to match
inferior's output.
---
gdb/testsuite/gdb.threads/manythreads.c | 3 ---
gdb/testsuite/gdb.threads/manythreads.exp | 3 ---
2 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/gdb/testsuite/gdb.threads/manythreads.c b/gdb/testsuite/gdb.threads/manythreads.c
index a622d99..3d10b9b 100644
--- a/gdb/testsuite/gdb.threads/manythreads.c
+++ b/gdb/testsuite/gdb.threads/manythreads.c
@@ -20,7 +20,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <pthread.h>
-#include <stdio.h>
#include <limits.h>
void *
@@ -28,8 +27,6 @@ thread_function (void *arg)
{
int x = * (int *) arg;
- printf ("Thread <%d> executing\n", x);
-
return NULL;
}
diff --git a/gdb/testsuite/gdb.threads/manythreads.exp b/gdb/testsuite/gdb.threads/manythreads.exp
index c863ee1..b2fa1d0 100644
--- a/gdb/testsuite/gdb.threads/manythreads.exp
+++ b/gdb/testsuite/gdb.threads/manythreads.exp
@@ -59,9 +59,6 @@ gdb_test_multiple "" "stop threads 1" {
-re "\\\[\[^\]\]* exited\\\]\r\n" {
exp_continue
}
- -re "Thread \[^\n\]* executing\r\n" {
- exp_continue
- }
-re "Program received signal SIGINT.*$gdb_prompt $" {
pass "$message"
}
--
1.7.7.6