Use DWARF_VMA_FMT to report error
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 21 Jun 2017 22:29:38 +0000 (15:29 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 21 Jun 2017 22:29:38 +0000 (15:29 -0700)
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.

binutils/ChangeLog
binutils/dwarf.c

index f5da75d70f85183dee609e1d20e45f7f9fd5cf09..a9166debf152dc702240d7128a190f749850290d 100644 (file)
@@ -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
index ee464391e18d00201215c5ae8d6d6eb21c879be5..5195f8d6b597821c0539fd8eb7d4448e6c33e114 100644 (file)
@@ -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;                                  \
     }                                                          \