From 89c527ff7b77a4e44115ad5b078345a23e49cba5 Mon Sep 17 00:00:00 2001 From: Rhys Kidd Date: Fri, 10 Jul 2015 08:14:18 +0000 Subject: [PATCH] Better align OS X error reporting with other platforms. Refer coregrind/m_ume/elf.c git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15408 --- coregrind/m_ume/macho.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/coregrind/m_ume/macho.c b/coregrind/m_ume/macho.c index 5c55141902..eac91e81bd 100644 --- a/coregrind/m_ume/macho.c +++ b/coregrind/m_ume/macho.c @@ -76,8 +76,10 @@ static void print(const HChar *str) static void check_mmap(SysRes res, Addr base, SizeT len, const HChar* who) { if (sr_isError(res)) { - VG_(printf)("valgrind: mmap-FIXED(0x%llx, %lld) failed in UME (%s).\n", - (ULong)base, (Long)len, who); + VG_(printf)("valgrind: mmap-FIXED(0x%llx, %lld) failed in UME (%s) " + "with error %lu (%s).\n", + (ULong)base, (Long)len, who, + sr_Err(res), VG_(strerror)(sr_Err(res)) ); VG_(exit)(1); } } @@ -86,8 +88,10 @@ static void check_mmap(SysRes res, Addr base, SizeT len, const HChar* who) static void check_mmap_float(SysRes res, SizeT len, const HChar* who) { if (sr_isError(res)) { - VG_(printf)("valgrind: mmap-FLOAT(size=%lld) failed in UME (%s).\n", - (Long)len, who); + VG_(printf)("valgrind: mmap-FLOAT(size=%lld) failed in UME (%s) " + "with error %lu (%s).\n", + (Long)len, who, + sr_Err(res), VG_(strerror)(sr_Err(res)) ); VG_(exit)(1); } } -- 2.47.2