diff options
author | Yao Qi <yao@codesourcery.com> | 2013-03-14 09:06:40 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2013-03-14 09:06:40 +0000 |
commit | a22fa6e48d4ba508fc441f77f6a35620c42226c3 (patch) | |
tree | 0d157eb8fe4d4ab74c2351dec243ed219068c96c /gdb | |
parent | d0353e76919f8bd8cfdd0e9da13fa16ab95df2d3 (diff) | |
download | gdb-a22fa6e48d4ba508fc441f77f6a35620c42226c3.zip gdb-a22fa6e48d4ba508fc441f77f6a35620c42226c3.tar.gz gdb-a22fa6e48d4ba508fc441f77f6a35620c42226c3.tar.bz2 |
gdb/
* tracepoint.c (tfile_write_status): Write trace notes and user
name into tfile if they are not NULL.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/tracepoint.c | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e5ab65e..f06b76e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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> diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index d579fb4..e8040d0 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -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"); } |