]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Merge r6444 (Print a marginally more helpful error message if UME (ELF
authorJulian Seward <jseward@acm.org>
Wed, 27 Dec 2006 05:21:14 +0000 (05:21 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 27 Dec 2006 05:21:14 +0000 (05:21 +0000)
loading) fails.)

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_2_BRANCH@6445

coregrind/m_ume.c

index 98bbe57fdee20761f2509eaec0c774ad27e17673..8ec468f244fb7b53da36e90d46b13630cb8d82f8 100644 (file)
@@ -71,8 +71,14 @@ struct elfinfo
 static void check_mmap(SysRes res, Addr base, SizeT len)
 {
    if (res.isError) {
-      VG_(printf)("valgrind: mmap(0x%llx, %lld) failed in UME with error %d.\n", 
-                  (ULong)base, (Long)len, res.val);
+      VG_(printf)("valgrind: mmap(0x%llx, %lld) failed in UME "
+                  "with error %d (%s).\n", 
+                  (ULong)base, (Long)len, 
+                  res.val, VG_(strerror)(res.val) );
+      if (res.val == VKI_EINVAL) {
+         VG_(printf)("valgrind: this can be caused by executables with "
+                     "very large text, data or bss segments.\n");
+      }
       VG_(exit)(1);
    }
 }