From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4274 invoked by alias); 22 Oct 2010 05:13:17 -0000 Received: (qmail 4264 invoked by uid 22791); 22 Oct 2010 05:13:16 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-gw0-f41.google.com (HELO mail-gw0-f41.google.com) (74.125.83.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 22 Oct 2010 05:13:12 +0000 Received: by gwb19 with SMTP id 19so395459gwb.0 for ; Thu, 21 Oct 2010 22:13:10 -0700 (PDT) Received: by 10.229.230.75 with SMTP id jl11mr1727815qcb.153.1287724390289; Thu, 21 Oct 2010 22:13:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.37.149 with HTTP; Thu, 21 Oct 2010 22:12:50 -0700 (PDT) From: Hui Zhu Date: Fri, 22 Oct 2010 05:13:00 -0000 Message-ID: Subject: [PATCH] tracepoint.c: fix the bug that S use utp->actions in trace_save To: gdb-patches ml Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-10/txt/msg00348.txt.bz2 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 * 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)