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:
@ -18,12 +18,16 @@ endif (LIBDWARF_LIBRARIES AND LIBDWARF_INCLUDE_DIRS)
|
|||||||
|
|
||||||
find_path (DWARF_INCLUDE_DIR
|
find_path (DWARF_INCLUDE_DIR
|
||||||
NAMES
|
NAMES
|
||||||
dwarf.h
|
libdwarf.h
|
||||||
PATHS
|
PATHS
|
||||||
/usr/include
|
/usr/include
|
||||||
|
/usr/include/libdwarf
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
|
/usr/local/include/libdwarf
|
||||||
/opt/local/include
|
/opt/local/include
|
||||||
|
/opt/local/include/libdwarf
|
||||||
/sw/include
|
/sw/include
|
||||||
|
/sw/include/libdwarf
|
||||||
ENV CPATH) # PATH and INCLUDE will also work
|
ENV CPATH) # PATH and INCLUDE will also work
|
||||||
#find_path (LIBDW_INCLUDE_DIR
|
#find_path (LIBDW_INCLUDE_DIR
|
||||||
# NAMES
|
# NAMES
|
||||||
|
|||||||
@ -79,7 +79,7 @@ if(BUILD_BOCHS)
|
|||||||
set(bochs_configure_params --enable-a20-pin --enable-x86-64 --enable-cpu-level=6 --enable-ne2000 --enable-acpi --enable-pci --enable-usb --enable-trace-cache --enable-fast-function-calls --enable-host-specific-asms --enable-disasm --enable-readline --enable-clgd54xx --enable-fpu --enable-vmx=2 --enable-monitor-mwait --enable-cdrom --enable-sb16=linux --enable-gdb-stub --disable-docbook --with-nogui --with-x11 --with-wx --with-sdl CACHE STRING "Bochs configure parameters")
|
set(bochs_configure_params --enable-a20-pin --enable-x86-64 --enable-cpu-level=6 --enable-ne2000 --enable-acpi --enable-pci --enable-usb --enable-trace-cache --enable-fast-function-calls --enable-host-specific-asms --enable-disasm --enable-readline --enable-clgd54xx --enable-fpu --enable-vmx=2 --enable-monitor-mwait --enable-cdrom --enable-sb16=linux --enable-gdb-stub --disable-docbook --with-nogui --with-x11 --with-wx --with-sdl CACHE STRING "Bochs configure parameters")
|
||||||
|
|
||||||
## Bochs CXX args for calling make
|
## Bochs CXX args for calling make
|
||||||
set(bochs_build_CXX CXX=${AGXX}\ -p\ ${PROJECT_SOURCE_DIR}/src\ -p\ ${PROJECT_SOURCE_DIR}/simulators\ -p\ ${PROJECT_SOURCE_DIR}/debuggers\ -p\ ${PROJECT_SOURCE_DIR}/tools\ -p\ ${PROJECT_BINARY_DIR}/src\ -I${PROJECT_SOURCE_DIR}/src/core\ -I${CMAKE_BINARY_DIR}/src/core\ ${CMAKE_AGPP_FLAGS}\ --Xcompiler)
|
set(bochs_build_CXX CXX=${AGXX}\ -p\ ${PROJECT_SOURCE_DIR}/src\ -p\ ${PROJECT_SOURCE_DIR}/simulators\ -p\ ${PROJECT_SOURCE_DIR}/debuggers\ -p\ ${PROJECT_SOURCE_DIR}/tools\ -p\ ${PROJECT_BINARY_DIR}/src\ -I${PROJECT_SOURCE_DIR}/src/core\ -I${CMAKE_BINARY_DIR}/src/core\ ${CMAKE_AGPP_FLAGS}\ --Xcompiler\ -std=gnu++98)
|
||||||
## Bochs libtool command.
|
## Bochs libtool command.
|
||||||
set(bochs_build_LIBTOOL LIBTOOL=/bin/sh\ ./libtool\ --tag=CXX)
|
set(bochs_build_LIBTOOL LIBTOOL=/bin/sh\ ./libtool\ --tag=CXX)
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
### Setup doxygen documentation
|
### Setup doxygen documentation
|
||||||
|
include(CMakeParseArguments) # work around internal FindDoxygen bug
|
||||||
find_package(Doxygen)
|
find_package(Doxygen)
|
||||||
if(DOXYGEN_FOUND)
|
if(DOXYGEN_FOUND)
|
||||||
# Using a .in file means we can use CMake to insert project settings
|
# Using a .in file means we can use CMake to insert project settings
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
import "google/protobuf/descriptor.proto";
|
import "google/protobuf/descriptor.proto";
|
||||||
extend google.protobuf.FieldOptions {
|
extend google.protobuf.FieldOptions {
|
||||||
optional bool sql_primary_key = 32382 [ default = false];
|
optional bool sql_primary_key = 32382 [ default = false];
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
message FailControlMessage {
|
message FailControlMessage {
|
||||||
enum Command {
|
enum Command {
|
||||||
// Minions may send these:
|
// Minions may send these:
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
message InjectionPointMessage {
|
message InjectionPointMessage {
|
||||||
// Costs of the hop chain on the PandaBoard
|
// Costs of the hop chain on the PandaBoard
|
||||||
// ToDo: Could be eliminated, but it is nice for evaluation
|
// ToDo: Could be eliminated, but it is nice for evaluation
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
message InjectionPointMessage {
|
message InjectionPointMessage {
|
||||||
required uint32 injection_instr = 1;
|
required uint32 injection_instr = 1;
|
||||||
}
|
}
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
message Trace_Event_Extended {
|
message Trace_Event_Extended {
|
||||||
// data value read/written
|
// data value read/written
|
||||||
optional uint64 data = 5;
|
optional uint64 data = 5;
|
||||||
|
|||||||
@ -27,7 +27,7 @@ LLVMtoFailTranslator & LLVMDisassembler::getTranslator() {
|
|||||||
|
|
||||||
void LLVMDisassembler::disassemble()
|
void LLVMDisassembler::disassemble()
|
||||||
{
|
{
|
||||||
error_code ec;
|
llvm::error_code ec;
|
||||||
for (section_iterator i = object->begin_sections(),
|
for (section_iterator i = object->begin_sections(),
|
||||||
e = object->end_sections();
|
e = object->end_sections();
|
||||||
i != e; i.increment(ec)) {
|
i != e; i.increment(ec)) {
|
||||||
|
|||||||
@ -23,7 +23,7 @@ int main(int argc, char* argv[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
OwningPtr<Binary> binary;
|
OwningPtr<Binary> binary;
|
||||||
if (error_code ec = createBinary(file, binary)) {
|
if (llvm::error_code ec = createBinary(file, binary)) {
|
||||||
std::cerr << "Dis" << ": '" << file << "': " << ec.message() << ".\n";
|
std::cerr << "Dis" << ": '" << file << "': " << ec.message() << ".\n";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
message OOStuBSProtoMsg {
|
message OOStuBSProtoMsg {
|
||||||
// Input: experiment parameters
|
// Input: experiment parameters
|
||||||
// (client executes 8 experiments, one for each bit at mem_addr)
|
// (client executes 8 experiments, one for each bit at mem_addr)
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
message CoolChecksumProtoMsg {
|
message CoolChecksumProtoMsg {
|
||||||
// parameters
|
// parameters
|
||||||
required uint32 instr_offset = 1;
|
required uint32 instr_offset = 1;
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
import "DatabaseCampaignMessage.proto";
|
import "DatabaseCampaignMessage.proto";
|
||||||
|
|
||||||
message CoredVoterProtoMsg {
|
message CoredVoterProtoMsg {
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
import "DatabaseCampaignMessage.proto";
|
import "DatabaseCampaignMessage.proto";
|
||||||
|
|
||||||
message DCIAOKernelProtoMsg {
|
message DCIAOKernelProtoMsg {
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
import "DatabaseCampaignMessage.proto";
|
import "DatabaseCampaignMessage.proto";
|
||||||
|
|
||||||
message CoredTesterProtoMsg {
|
message CoredTesterProtoMsg {
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
import "DatabaseCampaignMessage.proto";
|
import "DatabaseCampaignMessage.proto";
|
||||||
|
|
||||||
message EcosKernelTestProtoMsg {
|
message EcosKernelTestProtoMsg {
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
import "DatabaseCampaignMessage.proto";
|
import "DatabaseCampaignMessage.proto";
|
||||||
|
|
||||||
message ErikaTesterProtoMsg {
|
message ErikaTesterProtoMsg {
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
import "DatabaseCampaignMessage.proto";
|
import "DatabaseCampaignMessage.proto";
|
||||||
|
|
||||||
message FiascofailProtoMsg {
|
message FiascofailProtoMsg {
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
import "DatabaseCampaignMessage.proto";
|
import "DatabaseCampaignMessage.proto";
|
||||||
|
|
||||||
message GenericExperimentMessage {
|
message GenericExperimentMessage {
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
import "DatabaseCampaignMessage.proto";
|
import "DatabaseCampaignMessage.proto";
|
||||||
|
|
||||||
message KesoGcProtoMsg {
|
message KesoGcProtoMsg {
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
import "DatabaseCampaignMessage.proto";
|
import "DatabaseCampaignMessage.proto";
|
||||||
|
|
||||||
message KesoRefProtoMsg {
|
message KesoRefProtoMsg {
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
import "DatabaseCampaignMessage.proto";
|
import "DatabaseCampaignMessage.proto";
|
||||||
|
|
||||||
message L4SysProtoMsg {
|
message L4SysProtoMsg {
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
import "DatabaseCampaignMessage.proto";
|
import "DatabaseCampaignMessage.proto";
|
||||||
|
|
||||||
message LraSimpleProtoMsg {
|
message LraSimpleProtoMsg {
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
message MHTestData {
|
message MHTestData {
|
||||||
optional string foo = 1;
|
optional string foo = 1;
|
||||||
optional int32 input = 2;
|
optional int32 input = 2;
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
message NanoJPEGProtoMsg {
|
message NanoJPEGProtoMsg {
|
||||||
// Input: experiment parameters
|
// Input: experiment parameters
|
||||||
// (client executes one experiment for every specified bit in the target register)
|
// (client executes one experiment for every specified bit in the target register)
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
message RAMpageProtoMsg {
|
message RAMpageProtoMsg {
|
||||||
// Input: experiment parameters
|
// Input: experiment parameters
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
import "DatabaseCampaignMessage.proto";
|
import "DatabaseCampaignMessage.proto";
|
||||||
|
|
||||||
message VEZSProtoMsg {
|
message VEZSProtoMsg {
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
syntax = "proto2";
|
||||||
|
|
||||||
import "DatabaseCampaignMessage.proto";
|
import "DatabaseCampaignMessage.proto";
|
||||||
|
|
||||||
message WeathermonitorProtoMsg {
|
message WeathermonitorProtoMsg {
|
||||||
|
|||||||
@ -104,7 +104,7 @@ bool AdvancedMemoryImporter::handle_ip_event(fail::simtime_t curtime, instructio
|
|||||||
llvm::InitializeAllTargetMCs();
|
llvm::InitializeAllTargetMCs();
|
||||||
llvm::InitializeAllDisassemblers();
|
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";
|
LOG << m_elf->getFilename() << "': " << ec.message() << ".\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,6 +22,13 @@ if (BUILD_LLVM_DISASSEMBLER)
|
|||||||
find_package(Boost 1.42 COMPONENTS regex REQUIRED)
|
find_package(Boost 1.42 COMPONENTS regex REQUIRED)
|
||||||
include_directories(${Boost_INCLUDE_DIRS})
|
include_directories(${Boost_INCLUDE_DIRS})
|
||||||
link_directories(${Boost_LIBRARY_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)
|
endif(BUILD_LLVM_DISASSEMBLER)
|
||||||
|
|
||||||
find_package(MySQL REQUIRED)
|
find_package(MySQL REQUIRED)
|
||||||
|
|||||||
@ -18,7 +18,7 @@ bool InstructionImporter::handle_ip_event(fail::simtime_t curtime, instruction_c
|
|||||||
llvm::InitializeAllTargetMCs();
|
llvm::InitializeAllTargetMCs();
|
||||||
llvm::InitializeAllDisassemblers();
|
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";
|
LOG << m_elf->getFilename() << "': " << ec.message() << ".\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,7 +65,7 @@ bool RandomJumpImporter::handle_ip_event(fail::simtime_t curtime, instruction_co
|
|||||||
llvm::InitializeAllTargetMCs();
|
llvm::InitializeAllTargetMCs();
|
||||||
llvm::InitializeAllDisassemblers();
|
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";
|
LOG << m_elf->getFilename() << "': " << ec.message() << ".\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -133,7 +133,7 @@ bool RegisterImporter::handle_ip_event(fail::simtime_t curtime, instruction_coun
|
|||||||
llvm::InitializeAllTargetMCs();
|
llvm::InitializeAllTargetMCs();
|
||||||
llvm::InitializeAllDisassemblers();
|
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";
|
LOG << m_elf->getFilename() << "': " << ec.message() << ".\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user