Re: [PATCH 2/5] Save trace into CTF format

Andreas Schwab
2013-02-28T11:31:41Z

Yao Qi <yao@codesourcery.com> writes:

> On 02/27/2013 10:17 AM, Yao Qi wrote:
>> +static void
>> +ctf_write_frame_v_block (struct trace_file_writer *self,
>> + int num, LONGEST val)
>> +{
>> + struct ctf_writer_data *data = self->data;
>> + int one = 1;
>> +
>> + /* Event Id. */
>> + ctf_save_align_write (&data->tcs, (void *) &one, 4, 4);
>
> "&one" should be cast to "gdb_byte *" instead of "void *".

Either one should be int32_t, or 4 should be sizeof (one).

Andreas.

--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."