Skip to content
Snippets Groups Projects
Commit f24f9f21 authored by Christian Dietrich's avatar Christian Dietrich
Browse files

cored-tester: add color_assert listener only if existsing

The color_assert_port symbol does not exist in all dOSEK variant,
therefore we add the listener only if the symbol exists. Otherwise the
invalid handler will trigger on INV_ADDR

Change-Id: I7b81940a8413850527efb9e4bae86248794c622c
parent d38218f0
No related branches found
No related tags found
No related merge requests found
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-readline;--enable-clgd54xx;--enable-fpu;--enable-vmx=2;--enable-monitor-mwait;--enable-cdrom;--enable-sb16=linux;--enable-gdb-stub;--with-nogui" CACHE STRING "")
SET(BUILD_LLVM_DISASSEMBLER ON CACHE BOOL "" FORCE)
SET(PLUGINS_ACTIVATED "checkpoint;randomgenerator" CACHE STRING "")
......@@ -103,8 +103,10 @@ unsigned CoredTester::injectBitFlip(address_t data_address, unsigned data_width,
<< ") bitpos: " << bitpos
<< " value: 0x" << hex << setw(2) << setfill('0') << value << " -> 0x" << setw(2) << setfill('0') << injectedval
<< dec << endl;
if (reginfo.id == RID_PC)
if (reginfo.id == RID_PC) {
m_log << "Redecode current instruction" << endl;
redecodeCurrentInstruction();
}
return value;
} else {
......@@ -415,7 +417,11 @@ bool CoredTester::run() {
simulator.addListener(&l_panic);
simulator.addListener(&l_timeout);
simulator.addListener(&l_fail_trace);
simulator.addListener(&l_color_assert_port);
if (s_color_assert_port.isValid()) {
simulator.addListener(&l_color_assert_port);
} else {
m_log << "No color assert port" << endl;
}
simulator.addListener(&l_trace_end_marker);
// BPSingleListener single_step;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment