From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22009 invoked by alias); 11 May 2009 10:26:03 -0000 Received: (qmail 21998 invoked by uid 22791); 11 May 2009 10:26:02 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 May 2009 10:25:57 +0000 Received: (qmail 12523 invoked from network); 11 May 2009 10:25:55 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 May 2009 10:25:55 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: Can symbol-reading produce terminal output? Date: Mon, 11 May 2009 10:26:00 -0000 User-Agent: KMail/1.9.10 Cc: Joel Brobecker , Eli Zaretskii References: <83tz3ubd0h.fsf@gnu.org> <20090511101114.GC14773@adacore.com> In-Reply-To: <20090511101114.GC14773@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905111125.56242.pedro@codesourcery.com> X-IsSubscribed: yes 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: 2009-05/txt/msg00206.txt.bz2 On Monday 11 May 2009 11:11:14, Joel Brobecker wrote: > If we were doing things in a more systematic way, I'd say that this > call belongs in the code that handles kernel events. The terminal > should be the inferior's when we're waiting for events, and it should > be ours when we're no longer waiting (either processing an event, or > waiting for the next user command). That reminds me, though: What do > we do when we're in non-stop mode??? s/non-stop/async/. See linux_nat_terminal_inferior, and remote_terminal_inferior. Basically, if executing in the background, GDB stays with the terminal; If executing in the foreground, the inferior gets the terminal. The interesting question, is what happens with multi-process... Currently, I'm just ignoring that problem. If two programs want to fight for the terminal, then if you want to debug them simultaneously, you should attach to them anyway. -- Pedro Alves