summaryrefslogtreecommitdiff
path: root/view/kernelcache/core/MachOProcessor.h
diff options
context:
space:
mode:
Diffstat (limited to 'view/kernelcache/core/MachOProcessor.h')
-rw-r--r--view/kernelcache/core/MachOProcessor.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/view/kernelcache/core/MachOProcessor.h b/view/kernelcache/core/MachOProcessor.h
new file mode 100644
index 00000000..3e353a44
--- /dev/null
+++ b/view/kernelcache/core/MachOProcessor.h
@@ -0,0 +1,22 @@
+#pragma once
+#include "MachO.h"
+#include "KernelCache.h"
+
+// Process `KernelCacheMachOHeader`.
+class KernelCacheMachOProcessor
+{
+ BinaryNinja::Ref<BinaryNinja::BinaryView> m_view;
+ BinaryNinja::Ref<BinaryNinja::Logger> m_logger;
+
+ bool m_applyFunctions = true;
+
+public:
+ explicit KernelCacheMachOProcessor(BinaryNinja::Ref<BinaryNinja::BinaryView> view);
+
+ // Initialize header information such as sections and symbols.
+ void ApplyHeader(const KernelCache& cache, KernelCacheMachOHeader& header);
+
+ uint64_t ApplyHeaderSections(KernelCacheMachOHeader& header);
+
+ void ApplyHeaderDataVariables(KernelCacheMachOHeader& header);
+};