From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18175 invoked by alias); 2 Aug 2005 13:57:41 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 17536 invoked by uid 22791); 2 Aug 2005 13:57:31 -0000 Received: from ihemail2.lucent.com (HELO ihemail2.lucent.com) (192.11.222.163) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 02 Aug 2005 13:57:31 +0000 Received: from nbgif1.de.lucent.com (h135-246-31-82.lucent.com [135.246.31.82]) by ihemail2.lucent.com (8.12.11/8.12.11) with ESMTP id j72DvP9Z011070; Tue, 2 Aug 2005 08:57:26 -0500 (CDT) Received: from sfsws1.de.lucent.com (sfsws1 [135.246.31.38]) by nbgif1.de.lucent.com (8.11.7p1+Sun/8.11.7) with ESMTP id j72DvP622187; Tue, 2 Aug 2005 15:57:25 +0200 (MEST) Received: from sfsw51.de.lucent.com (sfsw51 [135.246.72.99]) by sfsws1.de.lucent.com (8.11.7p1+Sun/8.8.5) with ESMTP id j72DvO417942; Tue, 2 Aug 2005 15:57:25 +0200 (MEST) Received: (from kzeitler@localhost) by sfsw51.de.lucent.com (8.11.7p1+Sun/8.8.8) id j72DvOO13976; Tue, 2 Aug 2005 15:57:24 +0200 (MEST) To: Andreas Schwab Cc: gdb@sources.redhat.com, gdb-patches@sources.redhat.com Subject: Re: gdb output problems when run in shell (bash or ksh) References: From: Klaus Zeitler X-Flame: Trees are sick, huh? Date: Tue, 02 Aug 2005 13:57:00 -0000 In-Reply-To: (Andreas Schwab's message of "Tue, 02 Aug 2005 13:51:05 +0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-08/txt/msg00009.txt.bz2 >>>>> "Andreas" == Andreas Schwab writes: Andreas> Andreas> Does this patch help? Andreas> Andreas> * sol-thread.c (sol_thread_wait): Call target_terminal_ours before Andreas> printing output. Andreas> Andreas> --- gdb/sol-thread.c.~1.50.~ 2005-06-27 10:03:40.000000000 +0200 Andreas> +++ gdb/sol-thread.c 2005-08-02 13:46:35.000000000 +0200 Andreas> @@ -463,6 +463,7 @@ sol_thread_wait (ptid_t ptid, struct tar Andreas> && !ptid_equal (rtnval, save_ptid) Andreas> && !in_thread_list (rtnval)) Andreas> { Andreas> + target_terminal_ours (); Andreas> printf_filtered ("[New %s]\n", target_pid_to_str (rtnval)); Andreas> add_thread (rtnval); Andreas> } What a quick reply. Your patch didn't help, but if gave me an idea where to look. I searched for other calls of 'printf_filtered ("[New %s]\n"' (11 matches) and it worked, when I added the call to target_terminal_ours in module procfs.c to the first occurrence of 'printf_filtered ("[New %s]\n"': if (!in_thread_list (temp_ptid)) { target_terminal_ours (); printf_filtered ("[1:New %s]\n", target_pid_to_str (temp_ptid)); add_thread (temp_ptid); } A closer look revealed that the problem is caused by prompt_for_continue in fputs_maybe_filtered. It seems as if gdb counts the 'New thread' messages and prompts for continuation according to page height. When I set page height in gdb to 0, the problem also disappears. Thanks Klaus -- ------------------------------------------ | Klaus Zeitler Lucent Technologies | | Email: kzeitler@lucent.com | ------------------------------------------ --- Real programmers don't comment their code. It was hard to write, it should be hard to understand.