File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -293,18 +293,24 @@ def locate_module_and_debug_symbols(self):
293
293
return False
294
294
if not self .resolved_path and not os .path .exists (self .path ):
295
295
try :
296
- dsym = subprocess .check_output (
296
+ mdfind_results = subprocess .check_output (
297
297
["/usr/bin/mdfind" ,
298
- "com_apple_xcode_dsym_uuids == %s" % uuid_str ]).decode ("utf-8" )[:- 1 ]
299
- if dsym and os .path .exists (dsym ):
300
- print (('falling back to binary inside "%s"' % dsym ))
301
- self .symfile = dsym
298
+ "com_apple_xcode_dsym_uuids == %s" % uuid_str ]).decode ("utf-8" ).splitlines ()
299
+ found_matching_slice = False
300
+ for dsym in mdfind_results :
302
301
dwarf_dir = os .path .join (dsym , 'Contents/Resources/DWARF' )
302
+ if not os .path .exists (dwarf_dir ):
303
+ # Not a dSYM bundle, probably an Xcode archive.
304
+ continue
305
+ print ('falling back to binary inside "%s"' % dsym )
306
+ self .symfile = dsym
303
307
for filename in os .listdir (dwarf_dir ):
304
- self .path = os .path .join (dwarf_dir , filename )
305
- if not self .find_matching_slice ():
306
- return False
307
- break
308
+ self .path = os .path .join (dwarf_dir , filename )
309
+ if self .find_matching_slice ():
310
+ found_matching_slice = True
311
+ break
312
+ if found_matching_slice :
313
+ break
308
314
except :
309
315
pass
310
316
if (self .resolved_path and os .path .exists (self .resolved_path )) or (
You can’t perform that action at this time.
0 commit comments