Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions lldb/examples/python/crashlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, _, 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(
abs_path, os.X_OK
):
executables.append(abs_path)
for binary in executables:
basename = os.path.basename(binary)
if basename == self.identifier:
self.path = binary
found_matching_slice = True
break
if found_matching_slice:
Expand Down