From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13534 invoked by alias); 28 Jan 2015 12:01:32 -0000 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 Received: (qmail 13490 invoked by uid 89); 28 Jan 2015 12:01:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mga09.intel.com Received: from mga09.intel.com (HELO mga09.intel.com) (134.134.136.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Jan 2015 12:01:20 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 28 Jan 2015 03:58:03 -0800 X-ExtLoop1: 1 Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by fmsmga001.fm.intel.com with ESMTP; 28 Jan 2015 04:01:16 -0800 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.229]) by IRSMSX109.ger.corp.intel.com ([169.254.13.11]) with mapi id 14.03.0195.001; Wed, 28 Jan 2015 11:58:46 +0000 From: "Metzger, Markus T" To: Pedro Alves CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH v2 03/13] btrace, linux: add perf event buffer abstraction Date: Wed, 28 Jan 2015 16:50:00 -0000 Message-ID: References: <1416480444-9943-1-git-send-email-markus.t.metzger@intel.com> <1416480444-9943-4-git-send-email-markus.t.metzger@intel.com> <54C773CE.8040708@redhat.com> <54C7B38C.6090201@redhat.com> In-Reply-To: <54C7B38C.6090201@redhat.com> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00733.txt.bz2 > -----Original Message----- > From: Pedro Alves [mailto:palves@redhat.com] > Sent: Tuesday, January 27, 2015 4:50 PM > To: Metzger, Markus T > Cc: gdb-patches@sourceware.org > Subject: Re: [PATCH v2 03/13] btrace, linux: add perf event buffer abstra= ction >=20 > On 01/27/2015 03:31 PM, Metzger, Markus T wrote: >=20 > >> Isn't there a better type to use here instead of "long long"? > >> Why not size_t, if a host buffer size; uint64_t, if it's a fixed > >> buffer format, assuming 64-bit here; or ULONGEST, the widest > >> integer we support? > > > > I'm using the same data type as the respective fields in > > struct perf_event_mmap_page (after resolving a few typedefs). > > > > I'm also fine to directly use __u64 or to use uint64_t. >=20 > Ah, so fits in "fixed format" category. Let's go with > uint64_t then. gdb/nat/linux-btrace.c:450:24: error: assignment from incompatible pointer = type [-Werror] tinfo->bts.data_head =3D &header->data_head; ^ cc1: all warnings being treated as errors The problem is that stdint.h defines uint64_t as unsigned int. We know it's the same size on 64-bit systems so we could cast the pointer... I'd rather stay with unsigned long long, though. Markus. Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052