From 8e4f68bc6c141bb73ec28aca2cd2e00148750ad7 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Mon, 17 Feb 2025 09:23:54 -0500 Subject: Don't fully initialize when in parseOnly mode --- view/sharedcache/core/DSCView.cpp | 3 +++ view/sharedcache/core/DSCView.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'view/sharedcache') diff --git a/view/sharedcache/core/DSCView.cpp b/view/sharedcache/core/DSCView.cpp index b51f0d98..c22f8c1f 100644 --- a/view/sharedcache/core/DSCView.cpp +++ b/view/sharedcache/core/DSCView.cpp @@ -192,6 +192,9 @@ bool DSCView::Init() programSettings->Set("analysis.workflows.functionWorkflow", "core.function.dsc", this); } + if (m_parseOnly) + return true; + // Add Mach-O file header type info EnumerationBuilder cpuTypeBuilder; cpuTypeBuilder.AddMemberWithValue("CPU_TYPE_ANY", MACHO_CPU_TYPE_ANY); diff --git a/view/sharedcache/core/DSCView.h b/view/sharedcache/core/DSCView.h index d47dc179..bde2f7c2 100644 --- a/view/sharedcache/core/DSCView.h +++ b/view/sharedcache/core/DSCView.h @@ -9,7 +9,7 @@ class DSCView : public BinaryNinja::BinaryView { - [[maybe_unused]] bool m_parseOnly; + bool m_parseOnly; public: DSCView(const std::string &typeName, BinaryView *data, bool parseOnly = false); -- cgit v1.3.1