From: Paul Floyd Date: Thu, 13 Mar 2025 07:35:17 +0000 (+0100) Subject: Darwin: change message for failure to open a binary X-Git-Tag: VALGRIND_3_25_0~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b65a739f2a63047565ac2d654931c95ae9d44b62;p=thirdparty%2Fvalgrind.git Darwin: change message for failure to open a binary Previously was always ELF, now either ELF or mach-o. --- diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 6c4a69265..18fd33535 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -1329,12 +1329,16 @@ ULong VG_(di_notify_mmap)( Addr a, Bool allow_SkFileV, Int use_fd ) SysRes fd = VG_(open)( filename, oflags, 0 ); if (sr_isError(fd)) { if (sr_Err(fd) != VKI_EACCES) { +#if defined(VGO_darwin) + const HChar* message = "can't open file to inspect mach-o header"; +#else + const HChar* message = "can't open file to inspect ELF header"; +#endif DebugInfo fake_di; VG_(memset)(&fake_di, 0, sizeof(fake_di)); fake_di.fsm.filename = ML_(dinfo_strdup)("di.debuginfo.nmm", filename); - ML_(symerr)(&fake_di, True, - "can't open file to inspect ELF header"); + ML_(symerr)(&fake_di, True, message); } return 0; }