This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[FYI] Use pulongest in aarch64-linux-tdep.c
- From: Tom Tromey <tom at tromey dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tom at tromey dot com>
- Date: Tue, 2 Oct 2018 19:31:12 -0600
- Subject: [FYI] Use pulongest in aarch64-linux-tdep.c
I tried a build on macOS today and it failed due to a mismatch between
the printf format and the type in aarch64-linux-tdep.c. This patch
fixes the problem by using pulongest and %s rather than %ld.
gdb/ChangeLog
2018-10-02 Tom Tromey <tom@tromey.com>
* aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
---
gdb/ChangeLog | 4 ++++
gdb/aarch64-linux-tdep.c | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c
index e55b1a726f..f2962075c5 100644
--- a/gdb/aarch64-linux-tdep.c
+++ b/gdb/aarch64-linux-tdep.c
@@ -247,8 +247,8 @@ aarch64_linux_sigframe_init (const struct tramp_frame *self,
vq = sve_vq_from_vl (extract_unsigned_integer (buf, 2, byte_order));
if (vq != tdep->vq)
- error (_("Invalid vector length in signal frame %d vs %ld."), vq,
- tdep->vq);
+ error (_("Invalid vector length in signal frame %d vs %s."), vq,
+ pulongest (tdep->vq));
if (size >= AARCH64_SVE_CONTEXT_SIZE (vq))
sve_regs = section + AARCH64_SVE_CONTEXT_REGS_OFFSET;
--
2.17.1