From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5499 invoked by alias); 16 Mar 2012 15:01:29 -0000 Received: (qmail 5485 invoked by uid 22791); 16 Mar 2012 15:01:28 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,FROM_12LTRDOM 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, 16 Mar 2012 15:01:15 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1S8YeY-0000Js-Mx from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Fri, 16 Mar 2012 08:01:14 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Fri, 16 Mar 2012 08:01:14 -0700 Received: from localhost.localdomain (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; Fri, 16 Mar 2012 08:01:13 -0700 From: Yao Qi To: Subject: [PATCH 0/5] Preparatory patches for ITSET in GDBserver Date: Fri, 16 Mar 2012 15:01:00 -0000 Message-ID: <1331909994-9473-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-03/txt/msg00613.txt.bz2 Hi, This patch series include something that will be used when we support ITSET in GDBserver, and even in IPA. I applied Pedro's patches [1] on top of CVS trunk, and move most of ITSET code to gdb/common/, so that both GDB, GDBserver and IPA supports ITSET. I am still looking at the regressions in native testing and remote testing caused by patch 2/14 `running all-stop on top of non-stop', meanwhile I've queued too many patches in my local tree, so I think it is good if I: - Send some refactor patches upstreams first, to reduce the length of my patch queue, and to be motivated to look at the rest of regressions :) - Post my thoughts on supporting ITSET in GDB, GDBserver and IPA, to get feedbacks as early as possible. Before explain these patches, I want to explain my design on supporting ITSET in GDB, GDBserver and IPA. In patch series [1], ITSET is supported in GDB naturally. When supporting ITSET in GDBserver and IPA, GDB has to send ITSET to them in some format over RSP and IPA protocol. One decision we have to make here is the format of ITSET when sending it. We have two choices here, - ITSET spec, which is a string. GDB just sends a compiled version of ITSET (which is still an ITSET, but with different contents, I'll explain it later). Then GDBserver and IPA should be able to parse ITSET spec, build up a tree, and evaluate thread/cores on a given ITSET instance. - Agent Expression. GDB just transform ITSET from a string format to agent expression, and send agent expression to GDBsever and IPA. Agent expression has been supported in GDBserver and IPA, so we may have to add new opcode specific to ITSET operations, which is hard to me In ITSET, set is a unit in each operation, such as INTERSECTION and UNION. Looks hard to operate sets with arbitrary number of elements in a stack machine model. Then, I give up on this direction. Finally I choose the former approach. When GDB sending ITSET, it "compiles" itset to a new instance of itset which a) still complies to ITSET spec, b) replaced thread/inferior information that GDBserver or IPA understands. The string of compiled itset is sent over RSP to GDBserver, and get parsed there. In other words, GDBserver and IPA has equivalent ITSET functionality compared with GDB, so most of itset code is moved to gdb/common/. Then, it needs GDBserver can give similar support in GDB to ITSET code, so these patches come up. [1] [RFC/WIP I/T sets V2 PATCH 00/14] I/T sets. http://sourceware.org/ml/gdb-patches/2011-12/msg00550.html