From: Paul Floyd Date: Tue, 19 Sep 2023 17:53:06 +0000 (+0200) Subject: FreeBSD: refactor VG_(load_all_debuginfo) X-Git-Tag: VALGRIND_3_22_0~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c3f1794bc1ab053fd8c014b38f4746ed392d7cd;p=thirdparty%2Fvalgrind.git FreeBSD: refactor VG_(load_all_debuginfo) Thanks to Philippe Waroquiers for the suggestion --- diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index 4f6ffd48ae..51efe58c7a 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -5100,16 +5100,16 @@ static void caches__invalidate ( void ) { } #if defined(VGO_freebsd) +/* + * Used by FreeBSD if we detect a syscall cap_enter. That + * means capability mode, and lots of things won't work any more. + * Like opening new file handles. So try to make the most of a bad job + * and read all debuginfo in one go. + */ void VG_(load_all_debuginfo) (void) { for (DebugInfo* di = debugInfo_list; di; di = di->next) { - if (di->deferred == True) { - di->deferred = False; - ML_(read_elf_debug)( di ); - ML_(canonicaliseTables)( di ); - check_CFSI_related_invariants(di); - ML_(finish_CFSI_arrays)(di); - } + VG_(di_load_di)(di); } } #endif