History

Update registers view in debugger.

arr committed 9 years ago

Commit eb570d91 parent a46f30c1 file · +14 −3Browse files

Showing the changes to src/exec/debugger.cpp (1 of 1 file). Show all

Unified · Split

src/exec/debugger.cpp+14−3
@@ -162,10 +162,21 @@ namespace · 161 unmodified lines
162162 auto register_string = std::stringstream{};
163163
164164 register_string
165− << " Thread ID: " << r.thread.get_thread_id() << "\n"
166− << " PC: " << r.pc << " Module: " << r.module_ref->module->module_name->str() << "\n"
167− << " Opcode: " << r.module_ref->code_section[r.pc].op << "\n";
165+ << " Thread ID: " << r.thread.get_thread_id()
166+ << "\n Module: " << r.module_ref->module->module_name->str()
167+ << "\n PC: " << r.pc;
168168
169+ if (!r.module_ref->is_builtin_module())
170+ {
171+ assert(r.pc < static_cast<word_t>(r.module_ref->code_section.size()));
172+ const auto &op = r.module_ref->code_section[r.pc].op;
173+ register_string
174+ << "\n Src: " << op.source
175+ << "\n Mid: " << op.middle
176+ << "\n Dst: " << op.destination;
177+ }
178+
179+ register_string << "\n";
169180 return register_string.str();
170181 }
171182