Commit 4175127e authored by phlo's avatar phlo

fixed parsing of traces containing an EXIT call

parent b199c9c1
......@@ -131,6 +131,10 @@ Trace::Trace(std::istream & file, const std::string & path) :
const Instruction & op = program[pc];
// parse EXIT - not included in thread state update list
if (&op.symbol() == &Instruction::Exit::symbol)
exit = op.arg();
// parse instruction symbol
std::string symbol;
......@@ -765,7 +769,8 @@ bool Trace::push_back (Trace::update_map<T> & updates,
auto prev = updates.crbegin();
// ensure that no update exists for this step
if (prev->first == step)
assert(prev->first < step);
if (prev->first >= step)
throw std::runtime_error("update already exists");
// insert if value doesn't change
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment