This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [committed] : [PATCH 4/5] download and install tracepoint via agent
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Mon, 16 Apr 2012 23:06:52 +0800
- Subject: Re: [committed] : [PATCH 4/5] download and install tracepoint via agent
- References: <1331134287-24898-1-git-send-email-yao@codesourcery.com> <1331134287-24898-5-git-send-email-yao@codesourcery.com> <4F60F8F3.3030001@redhat.com> <4F8C045B.7050401@codesourcery.com>
On 04/16/2012 07:36 PM, Yao Qi wrote:
> else
> {
> - if (install_fast_tracepoint (tpoint, packet) == 0)
> + /* Tracepoint is installed successfully? */
> + int installed = 0;
> +
> + /* Download and install fast tracepoint by agent. */
> + if (use_agent
> + && agent_capability_check (AGENT_CAPA_FAST_TRACE))
> + installed = !tracepoint_send_agent (tpoint);
> + else
> + {
> + download_tracepoint_1 (tpoint);
> + installed = !install_fast_tracepoint (tpoint, packet);
> + }
> +
> + if (installed)
> prev_ftpoint = tpoint;
> }
Looks like I picked up an out-of-date patch to commit. Here is an
update on top of it. Sorry about that.
When we setting multiple fast tracepoints on the same address, GDB
still has to either send tracepoint to agent or download tracepoint.
--
gdb/gdbserver:
2012-04-16 Yao Qi <yao@codesourcery.com>
* tracepoint.c (cmd_qtstart): Download tracepoint even when it is
duplicated on address.
---
gdb/gdbserver/tracepoint.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index a0fd39e..2d5cb05 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -3244,17 +3244,26 @@ cmd_qtstart (char *packet)
if (tpoint->type == fast_tracepoint)
{
+ int use_agent_p
+ = use_agent && agent_capability_check (AGENT_CAPA_FAST_TRACE);
+
if (prev_ftpoint != NULL
&& prev_ftpoint->address == tpoint->address)
- clone_fast_tracepoint (tpoint, prev_ftpoint);
+ {
+ if (use_agent_p)
+ tracepoint_send_agent (tpoint);
+ else
+ download_tracepoint_1 (tpoint);
+
+ clone_fast_tracepoint (tpoint, prev_ftpoint);
+ }
else
{
/* Tracepoint is installed successfully? */
int installed = 0;
/* Download and install fast tracepoint by agent. */
- if (use_agent
- && agent_capability_check (AGENT_CAPA_FAST_TRACE))
+ if (use_agent_p)
installed = !tracepoint_send_agent (tpoint);
else
{
--
1.7.0.4