summaryrefslogtreecommitdiff
path: root/view/kernelcache/core/MachOProcessor.h
diff options
context:
space:
mode:
authorkat <kat@vector35.com>2025-07-06 15:05:01 -0400
committerkat <kat@vector35.com>2025-07-07 07:37:23 -0400
commit768f7c78465fb93936e5ca50a0ca712664fe54e7 (patch)
tree78c73e0022d6006882e365a257595a5b55a37432 /view/kernelcache/core/MachOProcessor.h
parent8f3e251c42169fb4fe8db9403d900571434d88ff (diff)
KernelCache rewrite
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);
+};