]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
FreeBSD: refactor VG_(load_all_debuginfo)
authorPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 19 Sep 2023 17:53:06 +0000 (19:53 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 19 Sep 2023 17:53:06 +0000 (19:53 +0200)
Thanks to Philippe Waroquiers for the suggestion

coregrind/m_debuginfo/debuginfo.c

index 4f6ffd48ae79845d5e9228f6a040ba8ec825bc6a..51efe58c7aef61914bc1fa55537b8c4780fa2dc3 100644 (file)
@@ -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