From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24671 invoked by alias); 12 Mar 2008 01:49:04 -0000 Received: (qmail 24220 invoked by uid 22791); 12 Mar 2008 01:49:03 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 12 Mar 2008 01:48:46 +0000 Received: (qmail 15238 invoked from network); 12 Mar 2008 01:48:44 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 12 Mar 2008 01:48:44 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Don't paginate "new thread" events Date: Wed, 12 Mar 2008 01:49:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_Xaz1H/WVmPVK4+z" Message-Id: <200803120149.11929.pedro@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00118.txt.bz2 --Boundary-00=_Xaz1H/WVmPVK4+z Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 620 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 --Boundary-00=_Xaz1H/WVmPVK4+z Content-Type: text/x-diff; charset="utf-8"; name="dont_paginate_threads.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dont_paginate_threads.diff" Content-length: 689 2008-03-12 Pedro Alves * 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; } --Boundary-00=_Xaz1H/WVmPVK4+z--