From: Hui Zhu <hui_zhu@mentor.com>
To: gdb-patches ml <gdb-patches@sourceware.org>
Subject: [PATCH] store trace default-collect to target [2/6] gdbserver
Date: Thu, 11 Apr 2013 09:14:00 -0000 [thread overview]
Message-ID: <51665569.5020708@mentor.com> (raw)
In-Reply-To: <51665508.5050706@mentor.com>
[-- Attachment #1: Type: text/plain, Size: 349 bytes --]
Hi,
This patch add support for "QTDDCsrc" and "qTDC" to gdbserver.
Thanks,
Hui
2013-04-11 Hui Zhu <hui@codesourcery.com>
* tracepoint.c (default_collect_src, cmd_qtdc, cmd_qtddcsrc): New.
(handle_tracepoint_general_set): Call cmd_qtddcsrc.
(handle_tracepoint_query): Call cmd_qtdc.
(initialize_tracepoint): Initialize default_collect_src.
[-- Attachment #2: defc-ser.txt --]
[-- Type: text/plain, Size: 1218 bytes --]
--- a/gdbserver/tracepoint.c
+++ b/gdbserver/tracepoint.c
@@ -4120,6 +4120,22 @@ cmd_qtnotes (char *own_buf)
write_ok (own_buf);
}
+static char *default_collect_src;
+
+static void
+cmd_qtdc (char *packet)
+{
+ sprintf (packet, "DC%s", default_collect_src);
+}
+
+static void
+cmd_qtddcsrc (char *own_buf)
+{
+ xfree (default_collect_src);
+ default_collect_src = xstrdup (own_buf + strlen ("QTDDCsrc:"));
+ write_ok (own_buf);
+}
+
int
handle_tracepoint_general_set (char *packet)
{
@@ -4194,6 +4210,11 @@ handle_tracepoint_general_set (char *pac
cmd_qtnotes (packet);
return 1;
}
+ else if (strncmp ("QTDDCsrc:", packet, strlen ("QTDDCsrc:")) == 0)
+ {
+ cmd_qtddcsrc (packet);
+ return 1;
+ }
return 0;
}
@@ -4261,6 +4282,11 @@ handle_tracepoint_query (char *packet)
cmd_qtminftpilen (packet);
return 1;
}
+ else if (strcmp ("qTDC", packet) == 0)
+ {
+ cmd_qtdc (packet);
+ return 1;
+ }
return 0;
}
@@ -7332,5 +7358,7 @@ initialize_tracepoint: mmap'ing jump pad
strcpy (gdb_trampoline_buffer_error, "No errors reported");
initialize_low_tracepoint ();
+#else
+ default_collect_src = xstrdup ("");
#endif
}
next prev parent reply other threads:[~2013-04-11 6:17 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-11 8:35 [PATCH] store trace default-collect to target [0/6] Hui Zhu
2013-04-11 8:37 ` [PATCH] store trace default-collect to target [1/6] target, trace and remote Hui Zhu
2013-04-11 22:58 ` Yao Qi
2013-04-16 15:22 ` Hui Zhu
2013-05-13 6:00 ` Hui Zhu
2013-04-11 22:59 ` Abid, Hafiz
2013-04-11 9:14 ` Hui Zhu [this message]
2013-05-13 6:01 ` [PATCH] store trace default-collect to target [2/6] gdbserver Hui Zhu
2013-04-11 10:33 ` [PATCH] store trace default-collect to target [3/6] tfile Hui Zhu
2013-04-11 22:59 ` Yao Qi
2013-04-12 14:58 ` Hui Zhu
2013-04-15 19:01 ` Hui Zhu
2013-04-16 15:34 ` Hui Zhu
2013-04-17 11:21 ` Yao Qi
2013-05-13 6:02 ` Hui Zhu
2013-04-11 10:36 ` [PATCH] store trace default-collect to target [4/6] save tracepoint Hui Zhu
2013-05-13 6:03 ` Hui Zhu
2013-04-11 10:48 ` [PATCH] store trace default-collect to target [5/6] doc Hui Zhu
2013-04-11 22:59 ` Yao Qi
2013-04-16 14:35 ` Hui Zhu
2013-04-11 23:00 ` Eli Zaretskii
2013-04-16 15:39 ` Hui Zhu
2013-04-16 15:44 ` Eli Zaretskii
2013-04-16 15:44 ` Hui Zhu
2013-05-13 6:04 ` Hui Zhu
2013-05-13 16:02 ` Eli Zaretskii
2013-05-14 1:36 ` Hui Zhu
2013-04-11 10:49 ` [PATCH] store trace default-collect to target [6/6] test Hui Zhu
2013-04-11 13:14 ` Yao Qi
2013-04-11 14:01 ` Hui Zhu
2013-04-11 15:24 ` Yao Qi
2013-04-16 15:44 ` Hui Zhu
2013-05-13 6:06 ` Hui Zhu
2013-05-13 5:33 ` [PATCH] store trace default-collect to target [0/6] Hui Zhu
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=51665569.5020708@mentor.com \
--to=hui_zhu@mentor.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