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

Pedro Alves palves@redhat.com
Wed Feb 10 22:20:00 GMT 2016


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



More information about the Gdb-patches mailing list