]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Darwin DRD: add a bodge for LLVM DWARF that our reader does not like
authorPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 11 Dec 2025 07:03:46 +0000 (08:03 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 11 Dec 2025 07:03:46 +0000 (08:03 +0100)
Longer term, need to understand Apple DWARF quirks and adapt to them
as necessary.

coregrind/m_debuginfo/readdwarf3.c

index 374237498ea41a7553eca6977a536849156b980e..b67e41b7cfba27cd2298e831fb7ff9599072cc3a 100644 (file)
@@ -2977,6 +2977,14 @@ static void parse_var_DIE (
       if (level == 0)
          setup_cu_svma(cc, have_lo, ip_lo, td3);
 
+#if defined(VGO_darwin)
+      // FIXME PJF Darwin LLVM generates this (non-standard?) combination
+      // it only seems to affect DRD
+      if (have_lo && have_range && !have_hi1) {
+         have_lo = False;
+      }
+#endif
+
       /* Do we have something that looks sane? */
       if (have_lo && have_hi1 && (!have_range)) {
          if (ip_lo < ip_hi1)