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

Hui Zhu teawater@gmail.com
Fri Oct 22 05:13:00 GMT 2010


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)



More information about the Gdb-patches mailing list