Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: Don't paginate "new thread" events
Date: Wed, 12 Mar 2008 01:49:00 -0000	[thread overview]
Message-ID: <200803120149.11929.pedro@codesourcery.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 620 bytes --]

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

[-- Attachment #2: dont_paginate_threads.diff --]
[-- Type: text/x-diff, Size: 689 bytes --]

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;
 }

             reply	other threads:[~2008-03-12  1:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-12  1:49 Pedro Alves [this message]
2008-03-12  3:01 ` Joel Brobecker
2008-03-12  3:13   ` Daniel Jacobowitz
2008-03-12 16:03     ` Joel Brobecker
2008-03-12 22:24       ` Pedro Alves
2008-03-12  3:27   ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200803120149.11929.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox