From cbd4d7f12d54ddc4b6d3d90a8d7b49591f468a94 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Mon, 20 Jan 2025 16:34:57 -0500 Subject: Allow overriding common loader settings when automatic load file parsing fails. --- view/elf/elfview.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'view/elf') diff --git a/view/elf/elfview.cpp b/view/elf/elfview.cpp index bf447a9a..29fc03d9 100644 --- a/view/elf/elfview.cpp +++ b/view/elf/elfview.cpp @@ -739,6 +739,9 @@ bool ElfView::Init() m_logger->LogError("ELF architecture %d is not supported", m_commonHeader.arch); break; } + + if (!m_parseOnly) + m_logger->LogWarn("Unable to determine architecture. Please open the file with options and select a valid architecture."); return false; } @@ -2944,8 +2947,8 @@ Ref ElfViewType::GetLoadSettingsForData(BinaryView* data) Ref viewRef = Parse(data); if (!viewRef || !viewRef->Init()) { - m_logger->LogError("View type '%s' could not be created", GetName().c_str()); - return nullptr; + m_logger->LogWarn("Failed to initialize view of type '%s'. Generating default load settings.", GetName().c_str()); + viewRef = data; } Ref settings = GetDefaultLoadSettingsForData(viewRef); -- cgit v1.3.1