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]

Re: [PATCH 2 OF 2] extend tsave to write start and stop time into a trace file


On 06/10/2013 05:08 PM, Hui Zhu wrote:
On Mon, Jun 10, 2013 at 8:47 PM, Dmitry Kozlov <dmitry_kozlov@mentor.com> 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

commit 47fa5083c22982ea135156ac8c2e67d222190781
Author: Dmitry Kozlov <dmitry_kozlov@mentor.com>
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 <ddk@codesourcery.com>
 
+	* tracepoint.c (trace_save): Extend tsave to save starttime, stoptime.
+
+2013-06-10  Dmitry Kozlov  <ddk@codesourcery.com>
+
 	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);

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