From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10257 invoked by alias); 6 Dec 2006 16:54:53 -0000 Received: (qmail 10248 invoked by uid 22791); 6 Dec 2006 16:54:53 -0000 X-Spam-Check-By: sourceware.org Received: from lon-del-04.spheriq.net (HELO lon-del-04.spheriq.net) (195.46.50.101) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 06 Dec 2006 16:54:44 +0000 Received: from lon-out-02.spheriq.net ([195.46.50.130]) by lon-del-04.spheriq.net with ESMTP id kB6GsfS8022933 for ; Wed, 6 Dec 2006 16:54:41 GMT Received: from lon-cus-02.spheriq.net (lon-cus-02.spheriq.net [195.46.50.38]) by lon-out-02.spheriq.net with ESMTP id kB6Gse8Z021980 for ; Wed, 6 Dec 2006 16:54:41 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-02.spheriq.net with ESMTP id kB6GsdWE018271 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 6 Dec 2006 16:54:40 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 725B5DA43; Wed, 6 Dec 2006 16:54:38 +0000 (GMT) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 16B9A475A9; Wed, 6 Dec 2006 16:54:38 +0000 (GMT) Received: from [164.129.15.13] (bri1043.bri.st.com [164.129.15.13]) by mail1.bri.st.com (MOS 3.7.5a-GA) with ESMTP id CIH09112 (AUTH stubbsa); Wed, 6 Dec 2006 16:54:36 GMT Message-ID: <4576F5CC.2000400@st.com> Date: Wed, 06 Dec 2006 16:54:00 -0000 From: Andrew STUBBS User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: Andrew STUBBS , GDB Patches , john.pye@anu.edu.au Subject: Re: [PATCH] Ctrl-D References: <456ED831.6000308@st.com> <20061205205030.GD25572@nevyn.them.org> In-Reply-To: <20061205205030.GD25572@nevyn.them.org> Content-Type: multipart/mixed; boundary="------------080309000002090000070407" 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: 2006-12/txt/msg00066.txt.bz2 This is a multi-part message in MIME format. --------------080309000002090000070407 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 262 Daniel Jacobowitz wrote: > OK for HEAD with or without that change, as you prefer. I'd recommend > this for 6.6 now that it's in HEAD; Joel, is that OK? Committed to both HEAD and gdb_6_6-branch with the suggested change. The final patch is attached. Andrew --------------080309000002090000070407 Content-Type: text/plain; name="ctrl-d.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ctrl-d.patch" Content-length: 1304 2006-12-06 Andrew Stubbs * event-top.c (command_handler): On EOF, print 'quit' and run quit command via execute_command such that hooks and trace work. * utils.c (defaulted_query): On EOF, print default answer and newline. Index: src/gdb/event-top.c =================================================================== --- src.orig/gdb/event-top.c 2006-12-06 10:49:25.000000000 +0000 +++ src/gdb/event-top.c 2006-12-06 13:52:46.000000000 +0000 @@ -501,7 +501,10 @@ command_handler (char *command) but GDB is still alive. In such a case, we just quit gdb killing the inferior program too. */ if (command == 0) - quit_command ((char *) 0, stdin == instream); + { + printf_unfiltered ("quit\n"); + execute_command ("quit", stdin == instream); + } time_at_cmd_start = get_run_time (); Index: src/gdb/utils.c =================================================================== --- src.orig/gdb/utils.c 2006-12-06 10:49:26.000000000 +0000 +++ src/gdb/utils.c 2006-12-06 13:54:01.000000000 +0000 @@ -1230,6 +1230,7 @@ defaulted_query (const char *ctlstr, con clearerr (stdin); /* in case of C-d */ if (answer == EOF) /* C-d */ { + printf_filtered ("EOF [assumed %c]\n", def_answer); retval = def_value; break; } --------------080309000002090000070407--