Fixed ProcessGDBRemote to kill the process correctly when it is either running
or stopped.
Added support for sections to be able to state if they are encrypted or not.
llvm-svn: 124171
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 0e82a15..7b045ab 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -251,6 +251,9 @@
load_cmd.filesize = m_data.GetAddress(&offset);
if (m_data.GetU32(&offset, &load_cmd.maxprot, 4))
{
+
+ const bool segment_is_encrypted = (load_cmd.flags & SegmentCommandFlagBitProtectedVersion1) != 0;
+
// Keep a list of mach segments around in case we need to
// get at data that isn't stored in the abstracted Sections.
m_mach_segments.push_back (load_cmd);
@@ -272,6 +275,7 @@
load_cmd.filesize, // Size in bytes of this section as found in the the file
load_cmd.flags)); // Flags for this section
+ segment_sp->SetIsEncrypted (segment_is_encrypted);
m_sections_ap->AddSection(segment_sp);
}
@@ -369,6 +373,7 @@
load_cmd.flags)); // Flags for this section
segment_sp->SetIsFake(true);
m_sections_ap->AddSection(segment_sp);
+ segment_sp->SetIsEncrypted (segment_is_encrypted);
}
}
assert (segment_sp.get());
@@ -482,6 +487,9 @@
sect64.offset,
sect64.offset == 0 ? 0 : sect64.size,
sect64.flags));
+ // Set the section to be encrypted to match the segment
+ section_sp->SetIsEncrypted (segment_is_encrypted);
+
segment_sp->GetChildren().AddSection(section_sp);
if (segment_sp->IsFake())