[Lldb-commits] [lldb] [lldb/crashlog] Implement speculative binary lookup for target creation (PR #154975)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 22 12:18:43 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}
----------------
bulbazord wrote:
Is this a dictionary for safe concurrent access? I'm not sure it's guaranteed to be thread safe if the GIL is disabled with newer versions of python, you might want a lock instead.
https://github.com/llvm/llvm-project/pull/154975
More information about the lldb-commits
mailing list