[Lldb-commits] [lldb] [lldb/crashlog] Fix module binary resolution (PR #91631)

Alex Langford via lldb-commits lldb-commits at lists.llvm.org
Thu May 9 12:42:21 PDT 2024


================
@@ -418,9 +418,20 @@ def locate_module_and_debug_symbols(self):
                         with print_lock:
                             print('falling back to binary inside "%s"' % dsym)
                         self.symfile = dsym
-                        for filename in os.listdir(dwarf_dir):
-                            self.path = os.path.join(dwarf_dir, filename)
-                            if self.find_matching_slice():
+                        # Look for the executable next to the dSYM bundle.
+                        parent_dir = os.path.dirname(dsym)
+                        executables = []
+                        for root, dirs, files in os.walk(parent_dir):
+                            for file in files:
+                                abs_path = os.path.join(root, file)
+                                if os.path.isfile(abs_path) and os.access(
----------------
bulbazord wrote:

This must necessarily be a file right? It's in the `files` output of `os.walk`. Could it be something else?

https://github.com/llvm/llvm-project/pull/91631


More information about the lldb-commits mailing list