From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12638 invoked by alias); 28 Feb 2013 11:31:41 -0000 Received: (qmail 12629 invoked by uid 22791); 28 Feb 2013 11:31:41 -0000 X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Feb 2013 11:31:34 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3EE45A398E; Thu, 28 Feb 2013 12:31:33 +0100 (CET) From: Andreas Schwab To: Yao Qi Cc: Subject: Re: [PATCH 2/5] Save trace into CTF format References: <1361931459-3953-1-git-send-email-yao@codesourcery.com> <1361931459-3953-3-git-send-email-yao@codesourcery.com> <512F38CE.5030802@codesourcery.com> X-Yow: I think I am an overnight sensation right now!! Date: Thu, 28 Feb 2013 13:17:00 -0000 In-Reply-To: <512F38CE.5030802@codesourcery.com> (Yao Qi's message of "Thu, 28 Feb 2013 19:00:30 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-02/txt/msg00734.txt.bz2 Yao Qi 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."