[Lldb-commits] [lldb] [lldb/crashlog] Implement speculative binary lookup for target creation (PR #154975)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 22 14:16:12 PDT 2025
================
@@ -340,11 +341,101 @@ def find_matching_slice(self):
print(
(
"error\n error: unable to locate '%s' with UUID %s"
- % (self.path, self.get_normalized_uuid_string())
+ % (path, self.get_normalized_uuid_string())
)
)
return False
+ def patch_binary_search_path(self):
+ home = os.path.expanduser("~")
+
+ patched_search_path = self.path.replace("/Users/USER", home)
+
+ if "*" in patched_search_path:
+ patched_search_path = patched_search_path[
+ : patched_search_path.index("*")
+ ]
+
+ return patched_search_path
+
+ def find_binary_with_speculative_path(self, target_uuid):
+ search_path = self.patch_binary_search_path()
+
+ target_uuid = target_uuid.lower()
+ stop_flag = {"found": False}
----------------
medismailben wrote:
I've looked it up and apparently setting a variable in dictionary in python is an atomic operation but I'll update `thread.Event` to make it more obvious.
https://github.com/llvm/llvm-project/pull/154975
More information about the lldb-commits
mailing list