From: Julian Seward Date: Wed, 27 Dec 2006 05:21:14 +0000 (+0000) Subject: Merge r6444 (Print a marginally more helpful error message if UME (ELF X-Git-Tag: svn/VALGRIND_3_2_2~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a4bdfa69cf2a16bcf759e8c2add5d8bd3a100d6;p=thirdparty%2Fvalgrind.git Merge r6444 (Print a marginally more helpful error message if UME (ELF loading) fails.) git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_2_BRANCH@6445 --- diff --git a/coregrind/m_ume.c b/coregrind/m_ume.c index 98bbe57fde..8ec468f244 100644 --- a/coregrind/m_ume.c +++ b/coregrind/m_ume.c @@ -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); } }