This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Use DWARF_VMA_FMT to report error
- From: H.J.Lu <hjl at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 21 Jun 2017 22:30:57 -0000
- Subject: [binutils-gdb] Use DWARF_VMA_FMT to report error
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=194747873fbe037e923eac3a61481ba16e50e322
commit 194747873fbe037e923eac3a61481ba16e50e322
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Jun 21 15:29:38 2017 -0700
Use DWARF_VMA_FMT to report error
Use DWARF_VMA_FMT to report error to work for both 32-bit and 64-bit
builds.
* dwarf.c (READ_ULEB): Use DWARF_VMA_FMT to report error.
(READ_SLEB): Likewise.
Diff:
---
binutils/ChangeLog | 5 +++++
binutils/dwarf.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index f5da75d..a9166de 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * dwarf.c (READ_ULEB): Use DWARF_VMA_FMT to report error.
+ (READ_SLEB): Likewise.
+
2017-06-21 Nick Clifton <nickc@redhat.com>
PR binutils/21648
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index ee46439..5195f8d 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -323,7 +323,7 @@ read_uleb128 (unsigned char * data,
\
(var) = _val = read_uleb128 (start, &length_return, end); \
if ((var) != _val) \
- error (_("Internal error: %s%d: LEB value (%#lx) too large for containing variable\n"), \
+ error (_("Internal error: %s%d: LEB value (%#" DWARF_VMA_FMT "x) too large for containing variable\n"), \
__FILE__, __LINE__, _val); \
start += length_return; \
} \
@@ -336,7 +336,7 @@ read_uleb128 (unsigned char * data,
\
(var) = _val = read_sleb128 (start, &length_return, end); \
if ((var) != _val) \
- error (_("Internal error: %s%d: LEB value (%#lx) too large for containing variable\n"), \
+ error (_("Internal error: %s%d: LEB value (%#" DWARF_VMA_FMT "x) too large for containing variable\n"), \
__FILE__, __LINE__, _val); \
start += length_return; \
} \