This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] tracepoint.c: fix the bug that S use utp->actions in trace_save


Ping.


---------- Forwarded message ----------
From: Hui Zhu <teawater@gmail.com>
Date: Fri, Oct 22, 2010 at 13:12
Subject: [PATCH] tracepoint.c: fix the bug that S use utp->actions in trace_save
To: gdb-patches ml <gdb-patches@sourceware.org>


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]