File tree 2 files changed +13
-0
lines changed
lldb/source/Plugins/ObjectFile/Mach-O
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -909,6 +909,11 @@ ConstString ObjectFileMachO::GetSegmentNameDWARF() {
909
909
return g_section_name;
910
910
}
911
911
912
+ ConstString ObjectFileMachO::GetSegmentNameLLVM_COV () {
913
+ static ConstString g_section_name (" __LLVM_COV" );
914
+ return g_section_name;
915
+ }
916
+
912
917
ConstString ObjectFileMachO::GetSectionNameEHFrame () {
913
918
static ConstString g_section_name_eh_frame (" __eh_frame" );
914
919
return g_section_name_eh_frame;
@@ -6175,6 +6180,13 @@ bool ObjectFileMachO::SectionIsLoadable(const Section *section) {
6175
6180
return false ;
6176
6181
if (GetModule ().get () != section->GetModule ().get ())
6177
6182
return false ;
6183
+ // firmware style binaries with llvm gcov segment do
6184
+ // not have that segment mapped into memory.
6185
+ if (section->GetName () == GetSegmentNameLLVM_COV ()) {
6186
+ const Strata strata = GetStrata ();
6187
+ if (strata == eStrataKernel || strata == eStrataRawImage)
6188
+ return false ;
6189
+ }
6178
6190
// Be careful with __LINKEDIT and __DWARF segments
6179
6191
if (section->GetName () == GetSegmentNameLINKEDIT () ||
6180
6192
section->GetName () == GetSegmentNameDWARF ()) {
Original file line number Diff line number Diff line change @@ -271,6 +271,7 @@ class ObjectFileMachO : public lldb_private::ObjectFile {
271
271
static lldb_private::ConstString GetSegmentNameOBJC ();
272
272
static lldb_private::ConstString GetSegmentNameLINKEDIT ();
273
273
static lldb_private::ConstString GetSegmentNameDWARF ();
274
+ static lldb_private::ConstString GetSegmentNameLLVM_COV ();
274
275
static lldb_private::ConstString GetSectionNameEHFrame ();
275
276
276
277
llvm::MachO::dysymtab_command m_dysymtab;
You can’t perform that action at this time.
0 commit comments