From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92262 invoked by alias); 6 Sep 2018 04:17:01 -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 92177 invoked by uid 89); 6 Sep 2018 04:17:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=publicly, encrypted, 237A, 7628 X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 06 Sep 2018 04:16:59 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1F52040216E3; Thu, 6 Sep 2018 04:16:58 +0000 (UTC) Received: from localhost (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2A98621B0; Thu, 6 Sep 2018 04:16:55 +0000 (UTC) From: Sergio Durigan Junior To: Tom Tromey Cc: gdb-patches@sourceware.org, Joel Brobecker , Jan Kratochvil Subject: Re: [FYI] Use pulongest in aarch64-linux-tdep.c References: <20180815160724.11227-1-tom@tromey.com> Date: Thu, 06 Sep 2018 04:17:00 -0000 In-Reply-To: <20180815160724.11227-1-tom@tromey.com> (Tom Tromey's message of "Wed, 15 Aug 2018 10:07:24 -0600") Message-ID: <87o9dbuuo8.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00086.txt.bz2 On Wednesday, August 15 2018, Tom Tromey wrote: > While testing a patch on the buildbot, I got this error: > > ../../binutils-gdb/gdb/aarch64-linux-tdep.c: In function uint64_t aarch64_linux_core_read_vq(gdbarch*, bfd*): > ../../binutils-gdb/gdb/aarch64-linux-tdep.c:285:29: error: format %ld expects argument of type long int, but argument 2 has type uint64_t {aka long long unsigned int} [-Werror=format=] > > This patch avoids the problem by using pulongest rather than %ld. > This seems safe to me because, if aarch64-linux-tdep.c is included in > the build, then ULONGEST must be a 64-bit type. Hi Tom, It seems like this commit should have been applied to the 8.2 branch, but wasn't. GDB 8.2 was released without it, and it breaks to build on i686 and armvhl, as can be seen here: https://koji.fedoraproject.org/koji/taskinfo?taskID=29499845 I'll backport the commit locally and rebuild it, but I thought it'd be good to mention publicly in case anyone else is seeing these failures. Cheers, > gdb/ChangeLog > 2018-08-15 Tom Tromey > > * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest. > --- > gdb/ChangeLog | 4 ++++ > gdb/aarch64-linux-tdep.c | 5 +++-- > 2 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index d16920d80e9..9fac8ccf5f4 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,3 +1,7 @@ > +2018-08-15 Tom Tromey > + > + * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest. > + > 2018-08-14 Jan Vrany > > * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option. > diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c > index 99e6a1590b8..389f4f494ec 100644 > --- a/gdb/aarch64-linux-tdep.c > +++ b/gdb/aarch64-linux-tdep.c > @@ -282,12 +282,13 @@ aarch64_linux_core_read_vq (struct gdbarch *gdbarch, bfd *abfd) > if (vq > AARCH64_MAX_SVE_VQ) > { > warning (_("SVE Vector length in core file not supported by this version" > - " of GDB. (VQ=%ld)"), vq); > + " of GDB. (VQ=%s)"), pulongest (vq)); > return 0; > } > else if (vq == 0) > { > - warning (_("SVE Vector length in core file is invalid. (VQ=%ld"), vq); > + warning (_("SVE Vector length in core file is invalid. (VQ=%s"), > + pulongest (vq)); > return 0; > } > > -- > 2.17.1 -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/