We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 698e047 + 085a705 commit aeb3081Copy full SHA for aeb3081
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -6261,6 +6261,15 @@ Section *ObjectFileMachO::GetMachHeaderSection() {
6261
if (section->GetFileOffset() == 0 && SectionIsLoadable(section))
6262
return section;
6263
}
6264
+
6265
+ // We may have a binary in the shared cache that has a non-zero
6266
+ // file address for its first segment, traditionally the __TEXT segment.
6267
+ // Search for it by name and return it as our next best guess.
6268
+ SectionSP text_segment_sp =
6269
+ GetSectionList()->FindSectionByName(GetSegmentNameTEXT());
6270
+ if (text_segment_sp.get() && SectionIsLoadable(text_segment_sp.get()))
6271
+ return text_segment_sp.get();
6272
6273
return nullptr;
6274
6275
0 commit comments