|
|
4c2ad1 |
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
|
4c2ad1 |
From: Sergio Durigan Junior <sergiodj@redhat.com>
|
|
|
4c2ad1 |
Date: Thu, 6 Sep 2018 00:22:18 -0400
|
|
|
4c2ad1 |
Subject: gdb-use-pulongest-aarch64-linux-tdep.patch
|
|
|
4c2ad1 |
|
|
|
4c2ad1 |
;; Use pulongest in aarch64-linux-tdep.c.
|
|
|
4c2ad1 |
;; This patch was forgotten during the 8.2 release process, and is
|
|
|
4c2ad1 |
;; needed to unbreak GDB when compiling on 32-bit arches.
|
|
|
4c2ad1 |
|
|
|
4c2ad1 |
Use pulongest in aarch64-linux-tdep.c
|
|
|
4c2ad1 |
|
|
|
4c2ad1 |
While testing a patch on the buildbot, I got this error:
|
|
|
4c2ad1 |
|
|
|
4c2ad1 |
../../binutils-gdb/gdb/aarch64-linux-tdep.c: In function uint64_t aarch64_linux_core_read_vq(gdbarch*, bfd*):
|
|
|
4c2ad1 |
../../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=]
|
|
|
4c2ad1 |
|
|
|
4c2ad1 |
This patch avoids the problem by using pulongest rather than %ld.
|
|
|
4c2ad1 |
This seems safe to me because, if aarch64-linux-tdep.c is included in
|
|
|
4c2ad1 |
the build, then ULONGEST must be a 64-bit type.
|
|
|
4c2ad1 |
|
|
|
4c2ad1 |
gdb/ChangeLog
|
|
|
4c2ad1 |
2018-08-15 Tom Tromey <tom@tromey.com>
|
|
|
4c2ad1 |
|
|
|
4c2ad1 |
* aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
|
|
|
4c2ad1 |
|
|
|
4c2ad1 |
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c
|
|
|
4c2ad1 |
--- a/gdb/aarch64-linux-tdep.c
|
|
|
4c2ad1 |
+++ b/gdb/aarch64-linux-tdep.c
|
|
|
4c2ad1 |
@@ -282,12 +282,13 @@ aarch64_linux_core_read_vq (struct gdbarch *gdbarch, bfd *abfd)
|
|
|
4c2ad1 |
if (vq > AARCH64_MAX_SVE_VQ)
|
|
|
4c2ad1 |
{
|
|
|
4c2ad1 |
warning (_("SVE Vector length in core file not supported by this version"
|
|
|
4c2ad1 |
- " of GDB. (VQ=%ld)"), vq);
|
|
|
4c2ad1 |
+ " of GDB. (VQ=%s)"), pulongest (vq));
|
|
|
4c2ad1 |
return 0;
|
|
|
4c2ad1 |
}
|
|
|
4c2ad1 |
else if (vq == 0)
|
|
|
4c2ad1 |
{
|
|
|
4c2ad1 |
- warning (_("SVE Vector length in core file is invalid. (VQ=%ld"), vq);
|
|
|
4c2ad1 |
+ warning (_("SVE Vector length in core file is invalid. (VQ=%s"),
|
|
|
4c2ad1 |
+ pulongest (vq));
|
|
|
4c2ad1 |
return 0;
|
|
|
4c2ad1 |
}
|
|
|
4c2ad1 |
|