Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: [patch 2/8] New remote feature InstallInTrace
Date: Tue, 08 Nov 2011 06:12:00 -0000	[thread overview]
Message-ID: <4EB8C803.2020500@codesourcery.com> (raw)
In-Reply-To: <4EB8C551.9090609@codesourcery.com>

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

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 (齐尧)

[-- Attachment #2: 0002-install-in-trace-feature.patch --]
[-- Type: text/x-patch, Size: 2959 bytes --]


        * remote.c (struct remote_state): <install_in_trace> 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


  parent reply	other threads:[~2011-11-08  6:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08  6:00 [patch 0/8] Download tracepoint locations when tracing is running Yao Qi
2011-11-08  6:08 ` [patch 1/8] Download tracepoint on location level Yao Qi
2011-11-09  3:34   ` Yao Qi
2011-11-10 14:54     ` Pedro Alves
2011-11-08  6:12 ` Yao Qi [this message]
2011-11-10 15:03   ` [patch 2/8] New remote feature InstallInTrace Pedro Alves
2011-11-08  6:21 ` [patch 3/8] New target hook `to_can_download_tracepoint_loc' Yao Qi
2011-11-10 15:11   ` Pedro Alves
2011-11-08  6:30 ` [patch 4/8] Download tracepoint locations and track its status Yao Qi
2011-11-09  3:47   ` Yao Qi
2011-11-10 15:51     ` Pedro Alves
2011-11-12  2:11       ` Yao Qi
2011-11-14 12:24         ` Pedro Alves
2011-11-08  6:33 ` [patch 5/8] refactor gdbserver on installing fast tracepoint Yao Qi
2011-11-10 15:57   ` Pedro Alves
2011-11-08  6:40 ` [patch 6/8] gdbserver - Install tracepoint when tracing is running Yao Qi
2011-11-08  8:20   ` Eli Zaretskii
2011-11-08  8:41     ` Yao Qi
2011-11-08 11:38       ` Eli Zaretskii
2011-11-10 16:53   ` Pedro Alves
2011-11-12  2:40     ` Yao Qi
2011-11-14 12:32       ` Pedro Alves
2011-11-08  6:43 ` [patch 7/8] Documentation changes Yao Qi
2011-11-08  8:37   ` Eli Zaretskii
2011-11-10 17:02   ` Pedro Alves
2011-11-12  3:09     ` Yao Qi
2011-11-08  6:56 ` [patch 8/8] Test cases Yao Qi
2011-11-10 17:16   ` Pedro Alves
2011-11-10 18:28   ` Pedro Alves
2011-11-12  3:35     ` Yao Qi
2011-11-14 13:00       ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EB8C803.2020500@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox