This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Don't paginate "new thread" events
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 12 Mar 2008 01:49:11 +0000
- Subject: Don't paginate "new thread" events
New thread events printing ("New Thread 0x40077950 (LWP 13229)]") was
recently centralised in add_thread. Unfortunatelly it brought with
it a behaviour change. Before, we wouldn't paginate when these
events filled the terminal screen, and now we do. This is quite bad,
as gdb now waits for use input to proceed. Also, since add_thread
doesn't target_terminal_ours, gdb just stops due to SIGTTOU
when the pagination kicks in ("want to continue y or n" prompt). User
now has to fg to restore it...
Easilly reproduced by running manythreads.exp manually.
This patch restores the old behaviour.
OK?
--
Pedro Alves
2008-03-12 Pedro Alves <pedro@codesourcery.com>
* thread.c (add_thread): Use printf_unfiltered to print.
---
gdb/thread.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: src/gdb/thread.c
===================================================================
--- src.orig/gdb/thread.c 2008-03-12 01:36:24.000000000 +0000
+++ src/gdb/thread.c 2008-03-12 01:36:42.000000000 +0000
@@ -136,7 +136,7 @@ add_thread (ptid_t ptid)
struct thread_info *result = add_thread_silent (ptid);
if (print_thread_events)
- printf_filtered (_("[New %s]\n"), target_pid_to_str (ptid));
+ printf_unfiltered (_("[New %s]\n"), target_pid_to_str (ptid));
return result;
}