[Patch] Get trace file name when using 'target tfile'
Abid, Hafiz
hafiz_abid@mentor.com
Wed Feb 13 14:38:00 GMT 2013
Hi All,
When using 'target tfile', commands like 'info target' and 'info files'
don't show the name of the trace file. This patch adds this
information. It also add a new field in the output of the -trace-status
command so that frontends can get this inforamtion.
This patch was originally written by Pedro. I have updated and
regtested it.
Regards,
Abid
Before:
(gdb) info target
Local trace dump file:
Looking at a trace file.
(gdb) interpreter-exec mi -trace-status
^done,supported="file",running="0",stop-reason="request",frames="7215",frames-created="7215",buffer-size="5242880",buffer-free="2833070",disconnected="0",circular="0",user-name="",notes="",start-time="0.000000",stop-time="0.000000"
After:
(gdb) info target
Local trace dump file:
`/home/abidh/trace.txt'
(gdb) interpreter-exec mi -trace-status
^done,supported="file",trace-file="/home/abidh/trace.txt",running="0",stop-reason="request",frames="7215",frames-created="7215",buffer-size="5242880",buffer-free="2833070",disconnected="0",circular="0",user-name="",notes="",start-time="0.000000",stop-time="0.000000"
2013-02-13 Pedro Alves <pedro@codesourcery.com>
Hafiz Abid Qadeer <abidh@codesourcery.com>
gdb/
* tracepoint.c (trace_status_mi): Output "trace-file" field.
(tfile_open): Record the trace file's filename in the trace
status.
(tfile_files_info): Mention the name of the trace file.
* tracepoint.h (struct trace_status) <from_file>: Make it hold
the
trace file's filename instead of a boolean.
gdb/doc/
* gdb.texinfo (GDB/MI Tracepoint Commands) <-trace-status>:
Document the "trace-file" field.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trace.patch
Type: text/x-patch
Size: 2244 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20130213/22aa9e03/attachment.bin>
More information about the Gdb-patches
mailing list