summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/standalone_miri/miri.cpp3
-rw-r--r--tools/standalone_miri/miri.hpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/standalone_miri/miri.cpp b/tools/standalone_miri/miri.cpp
index 7407baf7..97343714 100644
--- a/tools/standalone_miri/miri.cpp
+++ b/tools/standalone_miri/miri.cpp
@@ -636,7 +636,8 @@ bool InterpreterThread::step_one(Value& out_thread_result)
assert( !this->m_stack.empty() );
assert( !this->m_stack.back().cb );
auto& cur_frame = this->m_stack.back();
- TRACE_FUNCTION_R(cur_frame.fcn->my_path << " BB" << cur_frame.bb_idx << "/" << cur_frame.stmt_idx, "");
+ auto instr_idx = this->m_instruction_count++;
+ TRACE_FUNCTION_R("#" << instr_idx << " " << cur_frame.fcn->my_path << " BB" << cur_frame.bb_idx << "/" << cur_frame.stmt_idx, "#" << instr_idx);
const auto& bb = cur_frame.fcn->m_mir.blocks.at( cur_frame.bb_idx );
const size_t MAX_STACK_DEPTH = 60;
diff --git a/tools/standalone_miri/miri.hpp b/tools/standalone_miri/miri.hpp
index 0b0f8f39..0b7fd4d6 100644
--- a/tools/standalone_miri/miri.hpp
+++ b/tools/standalone_miri/miri.hpp
@@ -62,11 +62,13 @@ class InterpreterThread
ModuleTree& m_modtree;
ThreadState m_thread;
+ size_t m_instruction_count;
::std::vector<StackFrame> m_stack;
public:
InterpreterThread(ModuleTree& modtree):
- m_modtree(modtree)
+ m_modtree(modtree),
+ m_instruction_count(0)
{
}
~InterpreterThread();