From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4942 invoked by alias); 27 Mar 2007 16:21:02 -0000 Received: (qmail 4918 invoked by uid 22791); 27 Mar 2007 16:20:59 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 27 Mar 2007 17:20:43 +0100 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id 427394B267; Tue, 27 Mar 2007 11:20:42 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id 162F54B262; Tue, 27 Mar 2007 11:20:42 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HWEPZ-0000yP-Jr; Tue, 27 Mar 2007 12:20:41 -0400 Date: Tue, 27 Mar 2007 16:21:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] The gcore command hangs without a terminal Message-ID: <20070327162041.GA3452@caradoc.them.org> Mail-Followup-To: Jan Kratochvil , gdb-patches@sourceware.org References: <20070225122641.GA25884@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070225122641.GA25884@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.14+cvs20070313 (2007-03-13) 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: 2007-03/txt/msg00245.txt.bz2 On Sun, Feb 25, 2007 at 01:26:42PM +0100, Jan Kratochvil wrote: > Hi, > > The function `attach_command' sets up the terminal by calling > target_terminal_inferior (). This makes gcore(1) to lock up when being run > without its controlling terminal. > > I do not find a reason for this terminal setup as GDB does not share its > input/output with the application in the mode of external attached program. Unfortunately I think this is the wrong place to fix it. You're commenting out a call to target_terminal_inferior, but there are lots of other calls to this function - including one any time we continue the program. target_terminal_inferior is a call eventually to terminal_inferior. This checks gdb_has_a_terminal (). How are you calling GDB without a controlling terminal that still lets gdb_has_a_terminal () return true? That's probably the right place to fix it. -- Daniel Jacobowitz CodeSourcery