From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1253 invoked by alias); 3 Oct 2012 14:09:40 -0000 Received: (qmail 1240 invoked by uid 22791); 3 Oct 2012 14:09:38 -0000 X-SWARE-Spam-Status: No, hits=-3.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Oct 2012 14:09:34 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1TJPdl-0000ap-Qc from Dmitry_Kozlov@mentor.com for gdb-patches@sourceware.org; Wed, 03 Oct 2012 07:09:33 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 3 Oct 2012 07:09:33 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Wed, 3 Oct 2012 15:09:31 +0100 Message-ID: <506C4719.3030900@mentor.com> Date: Wed, 03 Oct 2012 14:09:00 -0000 From: Dmitry Kozlov User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120912 Thunderbird/15.0.1 MIME-Version: 1.0 To: CC: "'Stan_Shebs@mentor.com'" , Vladimir Prus Subject: [PATCH] Extend tsave: save start time, stop time, user and notes Content-Type: multipart/mixed; boundary="------------040907030701010905090305" 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: 2012-10/txt/msg00037.txt.bz2 --------------040907030701010905090305 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 170 Hi, This patch extends tsave command to save some extra trace status information: start time, stop time, user and notes. Please consider applying it. Thank you, Dmitry --------------040907030701010905090305 Content-Type: text/plain; charset="UTF-8"; name="gdb_tsave.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gdb_tsave.txt" Content-length: 1219 2012-10-03 Dmitry Kozlov * tracepoint.c (trace_save): Add saving starttime, stoptime, user and notes. diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 0f94150..f7e96eb 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -3036,6 +3036,24 @@ trace_save (const char *filename, int target_does_save) fprintf (fp, ";disconn:%x", ts->disconnected_tracing); if (ts->circular_buffer) fprintf (fp, ";circular:%x", ts->circular_buffer); + if (ts->start_time) + fprintf (fp, ";starttime:%ld%06ld", (long int) (ts->start_time / 1000000), (long int) (ts->start_time % 1000000)); + if (ts->stop_time) + fprintf (fp, ";stoptime:%ld%06ld", (long int) (ts->stop_time / 1000000), (long int) (ts->stop_time % 1000000)); + if (ts->notes) + { + char *buf = (char *) alloca (strlen (ts->notes) * 2 + 1); + bin2hex ((gdb_byte *) ts->notes, buf, 0); + fprintf (fp, ";notes:%s", buf); + + } + if (ts->user_name) + { + char *buf = (char *) alloca (strlen (ts->user_name) * 2 + 1); + bin2hex ((gdb_byte *) ts->user_name, buf, 0); + fprintf (fp, ";username:%s", buf); + + } fprintf (fp, "\n"); /* Note that we want to upload tracepoints and save those, rather --------------040907030701010905090305--