public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Hui Zhu <teawater@gmail.com>
To: gdb-patches ml <gdb-patches@sourceware.org>
Subject: [PATCH] tracepoint.c: fix the bug that S use utp->actions in trace_save
Date: Fri, 22 Oct 2010 05:13:00 -0000	[thread overview]
Message-ID: <AANLkTikkaHLa01ZmJXP_BJgqn2_LpEn47krqrQ05egrT@mail.gmail.com> (raw)

Hi,

I found that in the tracepoint.c:trace_save(tsave will call this
function) generate a part S to save the action message:
      for (a = 0; VEC_iterate (char_ptr, utp->actions, a, act); ++a)
	fprintf (fp, "tp S%x:%s:%s\n",
		 utp->number, phex_nz (utp->addr, sizeof (utp->addr)), act);
But it same with the A part:
      for (a = 0; VEC_iterate (char_ptr, utp->actions, a, act); ++a)
	fprintf (fp, "tp A%x:%s:%s\n",
		 utp->number, phex_nz (utp->addr, sizeof (utp->addr)), act);

I think the S should use step_actions.

So I make a patch for it.

Thanks,
Hui

2010-10-22  Hui Zhu  <teawater@gmail.com>

	* tracepoint.c (trace_save): Change utp->actions to
	utp->step_actions.
---
 tracepoint.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/tracepoint.c
+++ b/tracepoint.c
@@ -2734,7 +2734,7 @@ trace_save (const char *filename, int ta
       for (a = 0; VEC_iterate (char_ptr, utp->actions, a, act); ++a)
 	fprintf (fp, "tp A%x:%s:%s\n",
 		 utp->number, phex_nz (utp->addr, sizeof (utp->addr)), act);
-      for (a = 0; VEC_iterate (char_ptr, utp->actions, a, act); ++a)
+      for (a = 0; VEC_iterate (char_ptr, utp->step_actions, a, act); ++a)
 	fprintf (fp, "tp S%x:%s:%s\n",
 		 utp->number, phex_nz (utp->addr, sizeof (utp->addr)), act);
       if (utp->at_string)

             reply	other threads:[~2010-10-22  5:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22  5:13 Hui Zhu [this message]
2010-10-27  8:21 ` Hui Zhu
2010-10-27 10:07   ` Pedro Alves
2010-10-28  3:47     ` 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=AANLkTikkaHLa01ZmJXP_BJgqn2_LpEn47krqrQ05egrT@mail.gmail.com \
    --to=teawater@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).