From 2e14fae29a88badc00f7707721f1fdf551391919 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 29 Jan 2008 16:36:33 +0000 Subject: [PATCH] * dwarf.c (print_dwarf_vma): Use mingw field type specified if necessary. --- binutils/ChangeLog | 3 ++- binutils/dwarf.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 77bc27fa6c7..541e37d680d 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,7 +1,8 @@ 2008-01-29 Nick Clifton * dwarf.c (print_dwarf_vma): New function. Display the value of a - dwarf_vma type at a specified precision. + dwarf_vma type at a specified precision. Use mingw field type + specified if necessary. (display_debug_loc): Use dwarf_vma type for begin and end values. Use print_dwarf_vma to display their values. Use byte_get_signed in order to correctly detect the -1 escape value. diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 057a1e6c57f..814e47953b1 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -175,7 +175,11 @@ print_dwarf_vma (dwarf_vma val, unsigned byte_size) integer value, so we print the full value into a buffer and then select the precision we need. */ #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) +#ifndef __MSVCRT__ snprintf (buff, sizeof (buff), "%16.16llx ", val); +#else + snprintf (buff, sizeof (buff), "%016I64x ", val); +#endif #else snprintf (buff, sizeof (buff), "%16.16lx ", val); #endif -- 2.30.2