From patchwork Wed Aug 15 16:07:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 28927 Received: (qmail 35245 invoked by alias); 15 Aug 2018 16:08:22 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 34731 invoked by uid 89); 15 Aug 2018 16:08:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:cmsmtp, H*RU:cmsmtp, tom@tromey.com, U*tom X-HELO: gateway32.websitewelcome.com Received: from gateway32.websitewelcome.com (HELO gateway32.websitewelcome.com) (192.185.145.107) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Aug 2018 16:08:19 +0000 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway32.websitewelcome.com (Postfix) with ESMTP id 3AA5240EED for ; Wed, 15 Aug 2018 11:08:18 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id pyKcfmTsvbXuJpyL3fACmD; Wed, 15 Aug 2018 11:08:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version :Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=6VcQyle7zg57i9lS3Hr7rQTFniQEu20lr+U1qX2Gyro=; b=cOXJZxWPNX1zWHCTJ/ByATw5FF y+ydQGchoh9VrRGISvhy/II/U1hGdyQDkyumLwpi5iel4qnTtGcZ+/e1jqY5Ag45Vg/aTcUJbj6JE LCkNdW1zhpt2UFctna8vtMD5J; Received: from 75-166-85-72.hlrn.qwest.net ([75.166.85.72]:35542 helo=pokyo.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fpyKc-000KcJ-5N; Wed, 15 Aug 2018 11:07:34 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [FYI] Use pulongest in aarch64-linux-tdep.c Date: Wed, 15 Aug 2018 10:07:24 -0600 Message-Id: <20180815160724.11227-1-tom@tromey.com> 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. 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; }