From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25024 invoked by alias); 27 Aug 2012 09:46:25 -0000 Received: (qmail 25016 invoked by uid 22791); 27 Aug 2012 09:46:24 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL,BAYES_00,FROM_12LTRDOM,KHOP_RCVD_UNTRUST,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; Mon, 27 Aug 2012 09:46:06 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1T5vtV-0006HR-2y from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Mon, 27 Aug 2012 02:46:05 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 27 Aug 2012 02:46:04 -0700 Received: from qiyao.dyndns.org.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.1.289.1; Mon, 27 Aug 2012 02:46:03 -0700 From: Yao Qi To: Subject: [PATCH 0/3] Factor code on suppress MI notification Date: Mon, 27 Aug 2012 09:46:00 -0000 Message-ID: <1346060757-30130-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain 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/msg00792.txt.bz2 Hi, When writing new MI notifications, I have to add 'else if (strncmp())' stuff to suppress each new MI notification, and I don't like this way. This patch set is to factor the code on notification suppressing. Patch 3/3 is the major part of this set, which adds a new field 'called' in 'struct mi_cmd', and associate this field of each mi_cmd to the flag of suppress notification we already have. It is simple that when we want to add a new flag to suppress some notifications. Patch 1/3 is obvious, and I'll apply it. Patch 2/3 is to define two new macros to simply the struct initialization in array 'mi_cmds'. Regression tested on x86_64-linux with native and gdbserver. OK to apply?