]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Better align OS X error reporting with other platforms. Refer coregrind/m_ume/elf.c
authorRhys Kidd <rhyskidd@gmail.com>
Fri, 10 Jul 2015 08:14:18 +0000 (08:14 +0000)
committerRhys Kidd <rhyskidd@gmail.com>
Fri, 10 Jul 2015 08:14:18 +0000 (08:14 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15408

coregrind/m_ume/macho.c

index 5c551419021d1db7dfcda7dc928bbe114947ab98..eac91e81bd6c1e20c5bd2f83ba8761511c456014 100644 (file)
@@ -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);
    }
 }