Skip to content

Commit 2989c4f

Browse files
authored
Merge pull request #8147 from jimingham/five-object-no-dsym
Don't search for separate debug files for mach-o object files (llvm#81041)
2 parents 8d15c88 + d3fa60c commit 2989c4f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,13 @@ SymbolVendorMacOSX::CreateInstance(const lldb::ModuleSP &module_sp,
119119
FileSpec dsym_fspec(module_sp->GetSymbolFileFileSpec());
120120

121121
ObjectFileSP dsym_objfile_sp;
122-
if (!dsym_fspec) {
122+
// On Darwin, we store the debug information either in object files,
123+
// using the debug map to tie them to the executable, or in a dSYM. We
124+
// pass through this routine both for binaries and for .o files, but in the
125+
// latter case there will never be an external debug file. So we shouldn't
126+
// do all the stats needed to find it.
127+
if (!dsym_fspec && module_sp->GetObjectFile()->CalculateType() !=
128+
ObjectFile::eTypeObjectFile) {
123129
// No symbol file was specified in the module, lets try and find one
124130
// ourselves.
125131
FileSpec file_spec = obj_file->GetFileSpec();

0 commit comments

Comments
 (0)