Skip to content

Commit

Permalink
[lldb] Pass important options to dsymForUUID (llvm#72669)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
JDevlieghere authored and zahiraam committed Nov 20, 2023
1 parent 2f0f97c commit 4831d1b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lldb/examples/python/crashlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4831d1b

Please sign in to comment.