Skip to content

Commit f8afa76

Browse files
authored
[lldb/crashlog] Use environment variable to manually set dsymForUUIDBinary (#94517)
In lldb, users can change the `dsymForUUID` binary using the `LLDB_APPLE_DSYMFORUUID_EXECUTABLE` environment variable. This patch changes the crashlog to support the same behaviour as lldb and uses this environment variable to disable `dsymForUUID` lookups in crashlog test by having it be empty. Since CI bots shoudn't have access to images on build records, it doesn't make sense to make use of `dsymForUUID` in tests. rdar://128953725 Signed-off-by: Med Ismail Bennani <[email protected]>
1 parent b477d1d commit f8afa76

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lldb/examples/python/crashlog.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,9 @@ class DarwinImage(symbolication.Image):
284284
"""Class that represents a binary images in a darwin crash log"""
285285

286286
dsymForUUIDBinary = "/usr/local/bin/dsymForUUID"
287-
if not os.path.exists(dsymForUUIDBinary):
287+
if "LLDB_APPLE_DSYMFORUUID_EXECUTABLE" in os.environ:
288+
dsymForUUIDBinary = os.environ["LLDB_APPLE_DSYMFORUUID_EXECUTABLE"]
289+
elif not os.path.exists(dsymForUUIDBinary):
288290
try:
289291
dsymForUUIDBinary = (
290292
subprocess.check_output("which dsymForUUID", shell=True)

lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ if 'system-darwin' not in config.available_features:
33

44
if 'lldb-repro' in config.available_features:
55
config.unsupported = True
6+
7+
config.environment["LLDB_APPLE_DSYMFORUUID_EXECUTABLE"] = ""

0 commit comments

Comments
 (0)