From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13109 invoked by alias); 10 Jun 2013 13:11:38 -0000 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 Received: (qmail 13098 invoked by uid 89); 10 Jun 2013 13:11:38 -0000 X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 10 Jun 2013 13:11:37 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Um1sk-0007dQ-Ip from Dmitry_Kozlov@mentor.com ; Mon, 10 Jun 2013 06:11:34 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 10 Jun 2013 06:11:34 -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.2.247.3; Mon, 10 Jun 2013 14:11:32 +0100 Message-ID: <51B5D080.4080206@mentor.com> Date: Mon, 10 Jun 2013 14:21:00 -0000 From: Dmitry Kozlov User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: Hui Zhu CC: , Pedro Alves , Vladimir Prus Subject: Re: [PATCH 2 OF 2] extend tsave to write start and stop time into a trace file References: <51B5CAF5.3090101@mentor.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------040105090003010103060006" X-Virus-Found: No X-SW-Source: 2013-06/txt/msg00227.txt.bz2 --------------040105090003010103060006 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 461 On 06/10/2013 05:08 PM, Hui Zhu wrote: > On Mon, Jun 10, 2013 at 8:47 PM, Dmitry Kozlov wrote: >> Hi Pedro, >> some time ago we already discussed these patches, could you please review >> them again. >> >> And this one extends tsave command to write start and stop time into a >> tracefile. >> >> >> Thank you, >> Dmitry >> > This patch gdb_1_of_2_tstatus.diff is not the right one? Sure, proper attached. Thank you! > Thanks, > Hui --------------040105090003010103060006 Content-Type: text/x-patch; name="gdb_2_of_2_tsave.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gdb_2_of_2_tsave.diff" Content-length: 1395 commit 47fa5083c22982ea135156ac8c2e67d222190781 Author: Dmitry Kozlov Date: Mon Jun 10 16:30:49 2013 +0400 Extend tsave to save starttime, stoptime. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 561d93b..c775e34 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2013-06-10 Dmitry Kozlov + * tracepoint.c (trace_save): Extend tsave to save starttime, stoptime. + +2013-06-10 Dmitry Kozlov + Fix trace-status to output proper start-time and stop-time. * tracepoint.c (trace_status_command): Fix type of printf arg to prevent improper type conversion. diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 38362b4..6af88f5 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -3138,6 +3138,16 @@ tfile_write_status (struct trace_file_writer *self, fprintf (writer->fp, ";disconn:%x", ts->disconnected_tracing); if (ts->circular_buffer) fprintf (writer->fp, ";circular:%x", ts->circular_buffer); + if (ts->start_time) + { + fprintf (writer->fp, ";starttime:%s", + phex_nz (ts->start_time, sizeof (ts->start_time))); + } + if (ts->stop_time) + { + fprintf (writer->fp, ";stoptime:%s", + phex_nz (ts->stop_time, sizeof (ts->stop_time))); + } if (ts->notes != NULL) { char *buf = (char *) alloca (strlen (ts->notes) * 2 + 1); --------------040105090003010103060006--