gdb/
authorYao Qi <yao@codesourcery.com>
Thu, 14 Mar 2013 09:06:40 +0000 (09:06 +0000)
committerYao Qi <yao@codesourcery.com>
Thu, 14 Mar 2013 09:06:40 +0000 (09:06 +0000)
* tracepoint.c (tfile_write_status): Write trace notes and user
name into tfile if they are not NULL.

gdb/ChangeLog
gdb/tracepoint.c

index e5ab65e177ce18b7ad4891dbd187b16293d76ed3..f06b76e72c8355a3dc9875d9d0121d058742d373 100644 (file)
@@ -1,3 +1,8 @@
+2013-03-14  Yao Qi  <yao@codesourcery.com>
+
+       * tracepoint.c (tfile_write_status): Write trace notes and user
+       name into tfile if they are not NULL.
+
 2013-03-14  Hui Zhu  <hui@codesourcery.com>
            Yao Qi  <yao@codesourcery.com>
 
index d579fb43183908254d99eb206a291e27bf17dd7a..e8040d097d5c64d1da7d267a170d74187adf90aa 100644 (file)
@@ -3110,6 +3110,20 @@ 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->notes != NULL)
+    {
+      char *buf = (char *) alloca (strlen (ts->notes) * 2 + 1);
+
+      bin2hex ((gdb_byte *) ts->notes, buf, 0);
+      fprintf (writer->fp, ";notes:%s", buf);
+    }
+  if (ts->user_name != NULL)
+    {
+      char *buf = (char *) alloca (strlen (ts->user_name) * 2 + 1);
+
+      bin2hex ((gdb_byte *) ts->user_name, buf, 0);
+      fprintf (writer->fp, ";username:%s", buf);
+    }
   fprintf (writer->fp, "\n");
 }