fixes for Debian 9

- search for libdwarf.h in new locations (e.g., /usr/include/libdwarf/)
- build Bochs with -std=gnu++98 (gnu++14 is default since GCC 6.1)
- specify "proto2" syntax for protobuf messages
- minor build-system and C++ namespace fixes

Change-Id: I16dbc622c797ef8e936fe3c0fb9b03029d27529d
This commit is contained in:
Horst Schirmeier
2017-08-01 14:12:03 +02:00
parent d0d62de3f4
commit 3ad42e270c
33 changed files with 66 additions and 8 deletions

View File

@ -104,7 +104,7 @@ bool AdvancedMemoryImporter::handle_ip_event(fail::simtime_t curtime, instructio
llvm::InitializeAllTargetMCs();
llvm::InitializeAllDisassemblers();
if (error_code ec = createBinary(m_elf->getFilename(), binary)) {
if (llvm::error_code ec = createBinary(m_elf->getFilename(), binary)) {
LOG << m_elf->getFilename() << "': " << ec.message() << ".\n";
return false;
}

View File

@ -22,6 +22,13 @@ if (BUILD_LLVM_DISASSEMBLER)
find_package(Boost 1.42 COMPONENTS regex REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
# libelf and libdwarf required by ElfImporter
find_package(LibElf REQUIRED)
find_package(LibDwarf REQUIRED)
include_directories(${LIBELF_INCLUDE_DIRS})
include_directories(${LIBDWARF_INCLUDE_DIRS})
endif(BUILD_LLVM_DISASSEMBLER)
find_package(MySQL REQUIRED)

View File

@ -18,7 +18,7 @@ bool InstructionImporter::handle_ip_event(fail::simtime_t curtime, instruction_c
llvm::InitializeAllTargetMCs();
llvm::InitializeAllDisassemblers();
if (error_code ec = createBinary(m_elf->getFilename(), binary)) {
if (llvm::error_code ec = createBinary(m_elf->getFilename(), binary)) {
LOG << m_elf->getFilename() << "': " << ec.message() << ".\n";
return false;
}

View File

@ -65,7 +65,7 @@ bool RandomJumpImporter::handle_ip_event(fail::simtime_t curtime, instruction_co
llvm::InitializeAllTargetMCs();
llvm::InitializeAllDisassemblers();
if (error_code ec = createBinary(m_elf->getFilename(), binary)) {
if (llvm::error_code ec = createBinary(m_elf->getFilename(), binary)) {
LOG << m_elf->getFilename() << "': " << ec.message() << ".\n";
return false;
}

View File

@ -133,7 +133,7 @@ bool RegisterImporter::handle_ip_event(fail::simtime_t curtime, instruction_coun
llvm::InitializeAllTargetMCs();
llvm::InitializeAllDisassemblers();
if (error_code ec = createBinary(m_elf->getFilename(), binary)) {
if (llvm::error_code ec = createBinary(m_elf->getFilename(), binary)) {
LOG << m_elf->getFilename() << "': " << ec.message() << ".\n";
return false;
}