From 38fbc300b38aeb7b337abe0526eaa7f738b305dc Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Thu, 11 Dec 2025 08:03:46 +0100 Subject: [PATCH] Darwin DRD: add a bodge for LLVM DWARF that our reader does not like Longer term, need to understand Apple DWARF quirks and adapt to them as necessary. --- coregrind/m_debuginfo/readdwarf3.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/coregrind/m_debuginfo/readdwarf3.c b/coregrind/m_debuginfo/readdwarf3.c index 374237498..b67e41b7c 100644 --- a/coregrind/m_debuginfo/readdwarf3.c +++ b/coregrind/m_debuginfo/readdwarf3.c @@ -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) -- 2.47.3