On 14/02/13 14:34:15, Pedro Alves wrote: > On 02/14/2013 03:16 AM, Yao Qi wrote: > > On 02/13/2013 10:38 PM, Abid, Hafiz wrote: > >> - /* This is true if the status is coming from a file rather > >> - than a live target. */ > >> - int from_file; > >> + /* If the status is coming from a file rather than a live > target, > >> + this points at the file's filename. Otherwise, this is > NULL. */ > >> + const char *from_file; > > > > How about rename this field to "trace_filename", or something > similar? "from_file" is fine as a boolean, but is confusing as a the > name of trace file. > > Fine with me. I'd drop the "trace_" bit as being redundant > with "struct trace_status". > > -- > Pedro Alves > > Hi, Thanks everybody for review. The updated patch is attached. The changes from the previous version are. 1. Renamed "from_file" field to "filename". Use explicit NULL(or non-NULL) check against it. 2. Added a test case for -trace-struct command. 3. Added NEWS entry. How does it look? Regards, Abid 2013-02-14 Pedro Alves Hafiz Abid Qadeer gdb/ * NEWS: Mention new field "trace-file". * 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. Check the "filename" field explicitely. (trace_status_command): Explicitely check "filename" field. (trace_find_command): Ditto. (trace_find_pc_command): Ditto. (trace_find_tracepoint_command): Ditto. (trace_find_line_command): Ditto. (trace_find_range_command): Ditto. (trace_find_outside_command): Ditto. * tracepoint.h (struct trace_status) : Rename it to "filename" and make it hold the trace file's filename instead of a boolean. * remote.c (remote_get_trace_status): Initialize "filename" field with NULL instead of 0. gdb/doc/ * gdb.texinfo (GDB/MI Tracepoint Commands) <-trace-status>: Document the "trace-file" field. gdb/testsuite/ * gdb.trace/tfile.exp: Add test for -trace-status command.