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]

Re: [PATCH 2/3] gdb.trace: Read XML target description from tfile.


On 10/02/16 23:20, Pedro Alves wrote:
On 02/10/2016 08:19 PM, Marcin KoÅcielnicki wrote:
gdb/ChangeLog:

	* tracefile-tfile.c (trace_tdesc): New static variable.
	(tfile_open): Clear trace_tdesc, call target_find_description.
	(tfile_interp_line): Recognize tdesc lines.
	(tfile_close): Clear trace_tdesc.
	(tfile_xfer_partial_features): New function.
	(tfile_xfer_partial): Call tfile_xfer_partial_features.
	(tfile_append_tdesc_line): New function.
---
Fixes applied, buffer used.

Thanks.  This is OK, with...

+/* Handles tdesc lines from tfile by appending the payload to
+   a global trace_tdesc variable.  */
+
+static void
+tfile_append_tdesc_line (const char *line)
+{
+  int llen = strlen (line);
+

... this unused var dropped.

+  buffer_grow_str (&trace_tdesc, line);
+  buffer_grow_str (&trace_tdesc, "\n");
+}


Thanks,
Pedro Alves


Thanks, fixed and pushed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]