aboutsummaryrefslogtreecommitdiffstats
path: root/elff/dwarf_utils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'elff/dwarf_utils.cc')
-rw-r--r--elff/dwarf_utils.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/elff/dwarf_utils.cc b/elff/dwarf_utils.cc
index 1d84b66..3b998b4 100644
--- a/elff/dwarf_utils.cc
+++ b/elff/dwarf_utils.cc
@@ -14,7 +14,9 @@
* Contains implementation of misc. DWARF utility routines.
*/
-#include "stdio.h"
+#include <stdio.h>
+#define __STDC_FORMAT_MACROS 1
+#include <inttypes.h>
#include "dwarf_utils.h"
/* "Stringifies" the parameter. */
@@ -275,12 +277,12 @@ dump_value(const Dwarf_Value* attr_value) {
break;
case DWARF_VALUE_U64:
- printf("XWORD) = %" FMT_I64 "u (x%" FMT_I64 "X)\n", attr_value->u64,
+ printf("XWORD) = %" PRIu64 " (x%" PRIX64 ")\n", attr_value->u64,
attr_value->u64);
break;
case DWARF_VALUE_S64:
- printf("SXWORD) = %" FMT_I64 "d (x%" FMT_I64 "X)\n", attr_value->s64,
+ printf("SXWORD) = %" PRId64 " (x%" PRIX64 ")\n", attr_value->s64,
attr_value->s64);
break;
@@ -293,7 +295,7 @@ dump_value(const Dwarf_Value* attr_value) {
break;
case DWARF_VALUE_PTR64:
- printf("PTR64) = x%08" FMT_I64 "X\n", attr_value->ptr64);
+ printf("PTR64) = x%08" PRIX64 "\n", attr_value->ptr64);
break;
case DWARF_VALUE_BLOCK: