From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Kwok Cheung Yeung <kcy@codesourcery.com>
Subject: Re: [PATCH] Support for enabling/disabling tracepoints while a trace experiment is running
Date: Thu, 05 May 2011 17:48:00 -0000 [thread overview]
Message-ID: <201105051848.15560.pedro@codesourcery.com> (raw)
In-Reply-To: <4DC2DDEF.10600@codesourcery.com>
On Thursday 05 May 2011 18:27:11, Kwok Cheung Yeung wrote:
> * gdbserver/tracepoint.c (clear_installed_tracepoints): Uninstall
> disabled tracepoints.
gdbserver has its own gdbserver/ChangeLog file:
* tracepoint.c (clear_installed_tracepoints): Uninstall
disabled tracepoints.
> * NEWS: Add news item for the new behaviour of the enable and disable
> GDB commands when applied to tracepoints.
> Add news items for the new remote packets QTEnable and QTDisable.
>
> gdb/doc/
> * gdb.texinfo: Document change in the behaviour of the enable and
> disable GDB commands when applied to tracepoints.
> Document QTEnable and QTDisable in the list of tracepoint packets.
Eli is our documentation maintainer and will review these bits.
The code looks okay to me.
> static void
> +cmd_qtenable_disable (char *own_buf, int enable)
> +{
> + char *packet = own_buf;
> + ULONGEST num, addr;
> + struct tracepoint *tp;
> +
> + packet += strlen (enable ? "QTEnable:" : "QTDisable:");
> + packet = unpack_varlen_hex (packet, &num);
> + ++packet; /* skip a colon */
> + packet = unpack_varlen_hex (packet, &addr);
> +
> + tp = find_tracepoint (num, addr);
> +
> + if (tp)
> + {
> + if ((enable && tp->enabled) || (!enable && !tp->enabled))
but isn't this just:
if (enable != tp->enabled)
?
> + {
> + trace_debug ("Tracepoint %d at 0x%s is already %s",
> + (int) num, paddress (addr),
> + enable ? "enabled" : "disabled");
> + write_ok (own_buf);
> + return;
> + }
> +
--
Pedro Alves
next prev parent reply other threads:[~2011-05-05 17:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-05 17:27 Kwok Cheung Yeung
2011-05-05 17:48 ` Pedro Alves [this message]
2011-05-05 18:29 ` Kwok Cheung Yeung
2011-05-05 18:52 ` Eli Zaretskii
2011-05-05 23:13 ` Kwok Cheung Yeung
2011-05-05 23:47 ` Stan Shebs
2011-05-06 10:33 ` Eli Zaretskii
2011-05-09 19:31 ` Kwok Cheung Yeung
2011-05-09 19:35 ` Eli Zaretskii
2011-05-11 9:14 ` Pedro Alves
2011-05-06 17:42 ` Tom Tromey
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=201105051848.15560.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=kcy@codesourcery.com \
/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