From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16012 invoked by alias); 2 Mar 2012 01:06:16 -0000 Received: (qmail 16004 invoked by uid 22791); 2 Mar 2012 01:06:15 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00 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; Fri, 02 Mar 2012 01:05:57 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1S3GwW-0006Ej-6u from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 01 Mar 2012 17:05:56 -0800 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 1 Mar 2012 17:05:21 -0800 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.1.289.1; Thu, 1 Mar 2012 17:05:54 -0800 Message-ID: <4F501CF1.8000507@codesourcery.com> Date: Fri, 02 Mar 2012 01:06:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Subject: Re: [PATCH 2/2] OO tracepoint_action References: <1330650011-31899-1-git-send-email-yao@codesourcery.com> <1330650011-31899-3-git-send-email-yao@codesourcery.com> In-Reply-To: <1330650011-31899-3-git-send-email-yao@codesourcery.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit 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-03/txt/msg00066.txt.bz2 On 03/02/2012 09:00 AM, Yao Qi wrote: > This is the major part of this patch series, which replace several > switch/case blocks in code with function vectors. It is easier to add > new operation to tracepoint_action in the future. This patch is a mechanical refactor change, except in do_action_at_tracepoint. In GDBserver, we can install tracepoint_action_ops when creating tracepoint_action objects, however, in IPA, all tracepoint_actions objects are written from GDBserver. So when writing tracepoint_actions to IPA, we firstly write field `ops' to NULL, and check it in do_action_at_tracepoint. If `ops' field is NULL, install corresponding tracepoint_action_ops instances. The other approach is to expose the symbols of tracepoint_action_ops instances to GDBserver, so GDBserver can write it to `ops' field. This approach exposed too much details of IPA (symbols of tracepoint_action_ops variables), so I don't use it. -- Yao (齐尧)