[Lldb-commits] [lldb] [lldb] Pass important options to dsymForUUID (PR #72669)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 17 07:55:12 PST 2023
https://github.com/JDevlieghere created https://github.com/llvm/llvm-project/pull/72669
On macOS, we usually use the DebugSymbols framework to find dSYMs, but we have a few places (including crashlog.py) that calls out directly to dsymForUUID. Currently, this invocation is missing two important options:
* `--ignoreNegativeCache`: Poor network connectivity or lack of VPN can lead to a negative cache hit. Avoiding those issues is worth the penalty of skipping these caches.
* `--copyExecutable`: Ensure we copy the executable as it might not be available at its original location.
rdar://118480731
>From 0dd237e1d5bbbbdc7d9d40fe7be743d8e1a30c15 Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <jonas at devlieghere.com>
Date: Fri, 17 Nov 2023 07:45:43 -0800
Subject: [PATCH] [lldb] Pass important options to dsymForUUID
On macOS, we usually use the DebugSymbols framework to find dSYMs, but
we have a few places (including crashlog.py) that calls out directly to
dsymForUUID. Currently, this invocation is missing two important options:
* `--ignoreNegativeCache`: Poor network connectivity or lack of VPN
can lead to a negative cache hit. Avoiding those issues is worth the
penalty of skipping these caches.
* `--copyExecutable`: Ensure we copy the executable as it might not be
available at its original location.
rdar://118480731
---
lldb/examples/python/crashlog.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py
index cb8008419404c23..9e4f94264037aea 100755
--- a/lldb/examples/python/crashlog.py
+++ b/lldb/examples/python/crashlog.py
@@ -356,7 +356,11 @@ def locate_module_and_debug_symbols(self):
# Keep track of unresolved source paths.
unavailable_source_paths = set()
if os.path.exists(self.dsymForUUIDBinary):
- dsym_for_uuid_command = "%s %s" % (self.dsymForUUIDBinary, uuid_str)
+ dsym_for_uuid_command = (
+ "{} --copyExecutable --ignoreNegativeCache {}".format(
+ self.dsymForUUIDBinary, uuid_str
+ )
+ )
s = subprocess.check_output(dsym_for_uuid_command, shell=True)
if s:
try:
More information about the lldb-commits
mailing list