From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14622 invoked by alias); 9 May 2013 11:08:32 -0000 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 Received: (qmail 14607 invoked by uid 89); 9 May 2013 11:08:31 -0000 X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 09 May 2013 11:08:30 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1UaOi4-0007nL-Kf from Muhammad_Bilal@mentor.com ; Thu, 09 May 2013 04:08:28 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 9 May 2013 04:08:28 -0700 Received: from [137.202.157.37] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server (TLS) id 14.2.247.3; Thu, 9 May 2013 12:08:26 +0100 Message-ID: <518B83A7.3060804@codesourcery.com> Date: Thu, 09 May 2013 11:08:00 -0000 From: mbilal User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: CC: , Subject: Re: [PATCH 2/7] PR gdb/15224 fix for Unify interactivity tests to use input_from_terminal_p References: <51877A32.1030503@codesourcery.com> <51877A99.4060503@codesourcery.com> <5188AA15.5010904@codesourcery.com> <5188AC27.1050407@codesourcery.com> <5188AC99.6060504@codesourcery.com> <518A0B4E.50808@codesourcery.com> In-Reply-To: <518A0B4E.50808@codesourcery.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00305.txt.bz2 On Wednesday, May 08, 2013 9:22 PM Pedro Alves wrote: >I'd guess that input_from_terminal_p already does some of the >checks this is also making, so that this could be simplified. I don't think that because input_from_terminal_p checks the condition instream==stdin that is equal in both sanario , but input_from_terminal_p also return 1 when instream==NULL. So I think that there is no any condition that is overlapping with input_from_terminal_p. >Missing space before parens. fixed. >A ChangeLog entry is missing. fixed. Please find updated patch. Index: event-top.c =================================================================== RCS file: /cvs/src/src/gdb/event-top.c,v retrieving revision 1.94 diff -u -p -r1.94 event-top.c --- event-top.c 21 Mar 2013 17:37:29 -0000 1.94 +++ event-top.c 9 May 2013 10:23:21 -0000 @@ -604,7 +604,8 @@ command_line_handler (char *rl) /* Add line to history if appropriate. */ if (instream == stdin - && ISATTY (stdin) && *linebuffer) + && ISATTY (stdin) && *linebuffer + && input_from_terminal_p ()) add_history (linebuffer); Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.15497 diff -u -p -r1.15497 ChangeLog --- ChangeLog 1 May 2013 14:54:18 -0000 1.15497 +++ ChangeLog 9 May 2013 10:28:41 -0000 @@ -1,3 +1,9 @@ +2013-05-09 Muhammad Bilal + + PR gdb/15224 + * event-top.c (command_line_handler): Use input_from_terminal_p condition + for add line to history. + 2013-05-01 Joel Brobecker * darwin-nat.c (darwin_read_write_inferior): Change types