import-trace: fail gracefully if --elf is missing but needed
Change-Id: Ib154326507e307b65099f1b84c44e796b1aef98a
This commit is contained in:
@ -104,6 +104,11 @@ bool AdvancedMemoryImporter::handle_ip_event(fail::simtime_t curtime, instructio
|
||||
llvm::InitializeAllTargetMCs();
|
||||
llvm::InitializeAllDisassemblers();
|
||||
|
||||
if (!m_elf) {
|
||||
LOG << "Please give an ELF binary as parameter (-e/--elf)." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(m_elf->getFilename());
|
||||
if (!BinaryOrErr) {
|
||||
std::string Buf;
|
||||
|
||||
Reference in New Issue
Block a user