[Lldb-commits] [lldb] [lldb/crashlog] Use environment variable to manually set dsymForUUIDBinary (PR #94517)
via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 5 11:25:57 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Med Ismail Bennani (medismailben)
<details>
<summary>Changes</summary>
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
---
Full diff: https://github.com/llvm/llvm-project/pull/94517.diff
2 Files Affected:
- (modified) lldb/examples/python/crashlog.py (+3-1)
- (modified) lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg (+2)
``````````diff
diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py
index 641b2e64d53b1..c874cb4d32e66 100755
--- a/lldb/examples/python/crashlog.py
+++ b/lldb/examples/python/crashlog.py
@@ -284,7 +284,9 @@ class DarwinImage(symbolication.Image):
"""Class that represents a binary images in a darwin crash log"""
dsymForUUIDBinary = "/usr/local/bin/dsymForUUID"
- if not os.path.exists(dsymForUUIDBinary):
+ if "LLDB_APPLE_DSYMFORUUID_EXECUTABLE" in os.environ:
+ dsymForUUIDBinary = os.environ["LLDB_APPLE_DSYMFORUUID_EXECUTABLE"]
+ elif not os.path.exists(dsymForUUIDBinary):
try:
dsymForUUIDBinary = (
subprocess.check_output("which dsymForUUID", shell=True)
diff --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg
index 417069653d68e..3da9265b3553d 100644
--- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg
+++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/lit.local.cfg
@@ -3,3 +3,5 @@ if 'system-darwin' not in config.available_features:
if 'lldb-repro' in config.available_features:
config.unsupported = True
+
+config.environment["LLDB_APPLE_DSYMFORUUID_EXECUTABLE"] = ""
``````````
</details>
https://github.com/llvm/llvm-project/pull/94517
More information about the lldb-commits
mailing list