From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18340 invoked by alias); 27 Aug 2012 21:01:29 -0000 Received: (qmail 18320 invoked by uid 22791); 27 Aug 2012 21:01:26 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Aug 2012 21:01:08 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T66Qk-00073b-Um for gdb-patches@sources.redhat.com; Mon, 27 Aug 2012 23:01:06 +0200 Received: from h86-62-88-129.ln.rinet.ru ([86.62.88.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Aug 2012 23:01:06 +0200 Received: from ghost by h86-62-88-129.ln.rinet.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Aug 2012 23:01:06 +0200 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: [PATCH 3/3] suppress notification Date: Mon, 27 Aug 2012 21:01:00 -0000 Message-ID: References: <1346060757-30130-1-git-send-email-yao@codesourcery.com> <1346060757-30130-4-git-send-email-yao@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 In-Reply-To: <1346060757-30130-4-git-send-email-yao@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: 2012-08/txt/msg00818.txt.bz2 On 27.08.2012 13:45, Yao Qi wrote: > Hi, > This patch is to change the existing 'suppress mechanism' to avoid > adding endless command name comparisons to suppress corresponding MI > notification. This patch adds a new field 'called' in 'struct > mi_cmd', so that each MI command has a 'suppressed' flag associated to > it, and we don't have to compare command name anymore. Hi Yao, I am not 100% sure this is ideal approach. Your comment say: > + /* 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. So, at the very least, this field should have a different name, I think. Thanks, Volodya