From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4390 invoked by alias); 8 Nov 2011 06:12:53 -0000 Received: (qmail 4379 invoked by uid 22791); 8 Nov 2011 06:12:51 -0000 X-SWARE-Spam-Status: No, hits=-1.6 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; Tue, 08 Nov 2011 06:12:33 +0000 Received: from nat-jpt.mentorg.com ([192.94.33.2] helo=PR1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RNevA-0006z2-NT from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Mon, 07 Nov 2011 22:12:32 -0800 Received: from [127.0.0.1] ([172.16.63.104]) by PR1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 8 Nov 2011 15:12:31 +0900 Message-ID: <4EB8C803.2020500@codesourcery.com> Date: Tue, 08 Nov 2011 06:12:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110930 Thunderbird/7.0.1 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [patch 2/8] New remote feature InstallInTrace References: <4EB8C551.9090609@codesourcery.com> In-Reply-To: <4EB8C551.9090609@codesourcery.com> Content-Type: multipart/mixed; boundary="------------030803050709060008020006" 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: 2011-11/txt/msg00171.txt.bz2 This is a multi-part message in MIME format. --------------030803050709060008020006 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-length: 222 This patch is about adding a new remote feature `InstallInTrace' which indicates remote stubs supports downloading/installing tracepoint locations while tracing is running. It will be used in patch 4/8. -- Yao (齐尧) --------------030803050709060008020006 Content-Type: text/x-patch; name="0002-install-in-trace-feature.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0002-install-in-trace-feature.patch" Content-length: 2959 * remote.c (struct remote_state): new field. (PACKET_InstallInTrace): New enum value. (remote_install_in_trace_feature): Support InstallInTrace. (remote_supports_install_in_trace): Likewise. (remote_protocol_features): Likewise. (_initialize_remote): Likewise. --- gdb/remote.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/gdb/remote.c b/gdb/remote.c index 1c43f39..c34d47b 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -323,6 +323,10 @@ struct remote_state /* True if the stub reports support for static tracepoints. */ int static_tracepoints; + /* True if the stub reports support for installing tracepoint while + tracing. */ + int install_in_trace; + /* True if the stub can continue running a trace while GDB is disconnected. */ int disconnected_tracing; @@ -1261,6 +1265,7 @@ enum { PACKET_ConditionalTracepoints, PACKET_FastTracepoints, PACKET_StaticTracepoints, + PACKET_InstallInTrace, PACKET_bc, PACKET_bs, PACKET_TracepointSource, @@ -3696,6 +3701,16 @@ remote_static_tracepoint_feature (const struct protocol_feature *feature, } static void +remote_install_in_trace_feature (const struct protocol_feature *feature, + enum packet_support support, + const char *value) +{ + struct remote_state *rs = get_remote_state (); + + rs->install_in_trace = (support == PACKET_ENABLE); +} + +static void remote_disconnected_tracing_feature (const struct protocol_feature *feature, enum packet_support support, const char *value) @@ -3761,6 +3776,8 @@ static struct protocol_feature remote_protocol_features[] = { PACKET_FastTracepoints }, { "StaticTracepoints", PACKET_DISABLE, remote_static_tracepoint_feature, PACKET_StaticTracepoints }, + {"InstallInTrace", PACKET_DISABLE, remote_install_in_trace_feature, + PACKET_InstallInTrace}, { "DisconnectedTracing", PACKET_DISABLE, remote_disconnected_tracing_feature, -1 }, { "ReverseContinue", PACKET_DISABLE, remote_supported_packet, @@ -9748,6 +9765,14 @@ remote_supports_static_tracepoints (void) } static int +remote_supports_install_in_trace (void) +{ + struct remote_state *rs = get_remote_state (); + + return rs->install_in_trace; +} + +static int remote_supports_enable_disable_tracepoint (void) { struct remote_state *rs = get_remote_state (); @@ -11000,6 +11025,9 @@ Show the maximum size of the address (in bits) in a memory packet."), NULL, add_packet_config_cmd (&remote_protocol_packets[PACKET_StaticTracepoints], "StaticTracepoints", "static-tracepoints", 0); + add_packet_config_cmd (&remote_protocol_packets[PACKET_InstallInTrace], + "InstallInTrace", "install-in-trace", 0); + add_packet_config_cmd (&remote_protocol_packets[PACKET_qXfer_statictrace_read], "qXfer:statictrace:read", "read-sdata-object", 0); -- 1.7.0.4 --------------030803050709060008020006--