On 64-bit hosts %lX specifies 64-bit long variable, therefore when its used with 32-bit
target_ulong, it prints bogus 64 bit long value.
Note that PRIX64 macro could be broken on mingw32, maybe we should manually check
host word size in the future.
Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
{ "GLchar", "%" PRIi8 },
{ "GLintptr", "%ld" },
{ "GLsizeiptr", "%ld" },
- { "target_ulong", "0x%lX" }
+#if TARGET_LONG_SIZE == 4
+ { "target_ulong", "0x%X" }
+#elif TARGET_LONG_SIZE == 8
+ { "target_ulong", "0x%" PRIX64 }
+#else
+#error TARGET_LONG_SIZE undefined
+#endif
};
static yagl_log_level g_log_level = yagl_log_level_off;