From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10916 invoked by alias); 11 Apr 2013 02:43:53 -0000 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 Received: (qmail 10890 invoked by uid 89); 11 Apr 2013 02:43:52 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 11 Apr 2013 02:43:52 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1UQ7UM-000359-HS from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Wed, 10 Apr 2013 19:43:50 -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); Wed, 10 Apr 2013 19:43:49 -0700 Received: from qiyao.dyndns.org.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; Wed, 10 Apr 2013 19:43:49 -0700 From: Yao Qi To: Subject: [PATCH 2/7] Move rs->support_vCont_t to a separate struct Date: Thu, 11 Apr 2013 06:17:00 -0000 Message-ID: <1365648222-12540-3-git-send-email-yao@codesourcery.com> In-Reply-To: <1365648222-12540-1-git-send-email-yao@codesourcery.com> References: <1363006291-13334-1-git-send-email-yao@codesourcery.com> <1365648222-12540-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-04/txt/msg00299.txt.bz2 This is a refactor patch to move field 'support_vCont_t' to a separate struct 'support_v_cont', to prepare for adding more fields in it in the next patch. gdb: 2013-03-11 Yao Qi * remote.c (struct support_v_cont): New. (struct remote_state) : Remove. : New field. (remote_vcont_probe, remote_stop_ns): Update. --- gdb/remote.c | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/gdb/remote.c b/gdb/remote.c index de075c8..f6a3f4c 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -250,6 +250,14 @@ static struct cmd_list_element *remote_cmdlist; static struct cmd_list_element *remote_set_cmdlist; static struct cmd_list_element *remote_show_cmdlist; +/* The status of the stub supports for various vCont; packets. */ + +struct support_v_cont +{ + /* True if the stub reports support for vCont;t. */ + int t; +}; + /* Description of the remote protocol state for the currently connected target. This is per-target state, and independent of the selected architecture. */ @@ -307,8 +315,8 @@ struct remote_state /* True if the stub reports support for non-stop mode. */ int non_stop_aware; - /* True if the stub reports support for vCont;t. */ - int support_vCont_t; + /* The status of the stub supports for various vCont; packets. */ + struct support_v_cont support_vCont; /* True if the stub reports support for conditional tracepoints. */ int cond_tracepoints; @@ -4640,7 +4648,7 @@ remote_vcont_probe (struct remote_state *rs) support_S = 0; support_c = 0; support_C = 0; - rs->support_vCont_t = 0; + rs->support_vCont.t = 0; while (p && *p == ';') { p++; @@ -4653,7 +4661,7 @@ remote_vcont_probe (struct remote_state *rs) else if (*p == 'C' && (*(p + 1) == ';' || *(p + 1) == 0)) support_C = 1; else if (*p == 't' && (*(p + 1) == ';' || *(p + 1) == 0)) - rs->support_vCont_t = 1; + rs->support_vCont.t = 1; p = strchr (p, ';'); } @@ -5002,7 +5010,7 @@ remote_stop_ns (ptid_t ptid) if (remote_protocol_packets[PACKET_vCont].support == PACKET_SUPPORT_UNKNOWN) remote_vcont_probe (rs); - if (!rs->support_vCont_t) + if (!rs->support_vCont.t) error (_("Remote server does not support stopping threads")); if (ptid_equal (ptid, minus_one_ptid) -- 1.7.7.6