From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21414 invoked by alias); 28 Aug 2012 07:58:48 -0000 Received: (qmail 21404 invoked by uid 22791); 28 Aug 2012 07:58:46 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Aug 2012 07:58:24 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1T6Ggn-0005zF-2N from Yao_Qi@mentor.com ; Tue, 28 Aug 2012 00:58:21 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 28 Aug 2012 00:58:20 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.1.289.1; Tue, 28 Aug 2012 00:58:19 -0700 Message-ID: <503C7A1D.6040909@codesourcery.com> Date: Tue, 28 Aug 2012 07:58:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Vladimir Prus CC: Subject: Re: [PATCH 3/3] suppress notification References: <1346060757-30130-1-git-send-email-yao@codesourcery.com> <1346060757-30130-4-git-send-email-yao@codesourcery.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit 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: 2012-08/txt/msg00824.txt.bz2 On 08/28/2012 05:00 AM, Vladimir Prus wrote: >> + /* If non-null, the pointer to a flag indicates that this function >> is being >> + called. */ >> + int *called; > > But in practice, this is pointer that points to notification that must > be supressed when this > command is running. So, at least the comment is misleading. And if some > other code will > want to check whether the current command is A, it would have to look at > notification > flags. > Although field 'called' is added for notification suppressing, but I don't couple this field to notification suppressing. Ideally, field 'called' is set to 1 when the command/function is called, as comment says, and set back to 0 when it is done. At this point, it has nothing to do with notification suppressing, and we use this field to do something else in a free way. When we want to suppress notification, we make use of the feature of field 'called'. I am not sure it is misleading. If you still think it is misleading, I'd like to rename variable 'mi_suppress_notification' to 'mi_cmd_called'. WDYT? -- Yao