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

Marcin Kościelnicki
2016-02-10T22:35:37Z

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.