From 0dc0225dfa03a896ed34e0277ed4f8e5e7a453a3 Mon Sep 17 00:00:00 2001 From: Horst Schirmeier Date: Wed, 13 May 2020 17:26:44 +0200 Subject: [PATCH] import-trace: diagnose missing ELF in RandomJumpImporter Change-Id: Iede6947713f9e857e1d7c96f8d49e155ac4f59e5 --- tools/import-trace/RandomJumpImporter.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/import-trace/RandomJumpImporter.cc b/tools/import-trace/RandomJumpImporter.cc index a92af9d9..e799a904 100644 --- a/tools/import-trace/RandomJumpImporter.cc +++ b/tools/import-trace/RandomJumpImporter.cc @@ -62,6 +62,10 @@ bool RandomJumpImporter::handle_ip_event(fail::simtime_t curtime, instruction_co return false; } + if (!m_elf) { + LOG << "Please give an ELF binary as parameter (-e/--elf)." << std::endl; + return false; + } #if defined(BUILD_CAPSTONE_DISASSEMBLER) disas.reset(new CapstoneDisassembler(m_elf));