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] |
On 2018-06-07 19:27, Tom Tromey wrote:
@@ -336,20 +339,17 @@ tsave_command (const char *args, int from_tty) if (!filename) error_no_arg (_("file in which to save trace data")); + trace_file_writer_up writer; if (generate_ctf) - writer = ctf_trace_file_writer_new (); + writer.reset (ctf_trace_file_writer_new ()); else - writer = tfile_trace_file_writer_new (); - - back_to = make_cleanup (trace_file_writer_xfree, writer); + writer.reset (tfile_trace_file_writer_new ()); - trace_save (filename, writer, target_does_save); + trace_save (filename, writer.get (), target_does_save);
Could this call trace_save_tfile and trace_save_ctf instead to duplication?
if (generate_ctf) trace_save_ctf (filename, target_does_save); else trace_save_tfile (filename, target_does_save); Either way, LGTM. Simon
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |