Showing the changes to src/vm/tool_dispatch.cpp (1 of 6 files). Show all
Unified · Split
| @@ -364,7 +364,6 @@ void vm_tool_dispatch_t::resume_all_threads() · 363 unmodified lines | |||
| 364 | std::tuple<opcode_t, cookie_t> vm_tool_dispatch_t::get_original_opcode_and_cookie(const vm_registers_t &r) | 364 | std::tuple<opcode_t, cookie_t> vm_tool_dispatch_t::get_original_opcode_and_cookie(const vm_registers_t &r) |
| 365 | { | 365 | { |
| 366 | const auto module = r.module_ref->module.get(); | 366 | const auto module = r.module_ref->module.get(); |
| 367 | const auto current_pc = r.pc - 1; | ||
| 368 | 367 | ||
| 369 | if (module == nullptr || util::has_flag(module->header.runtime_flag, runtime_flags_t::builtin)) | 368 | if (module == nullptr || util::has_flag(module->header.runtime_flag, runtime_flags_t::builtin)) |
| 370 | throw vm_system_exception{ "Unable to determine original opcode in supplied module" }; | 369 | throw vm_system_exception{ "Unable to determine original opcode in supplied module" }; |
| @@ -375,7 +374,7 @@ std::tuple<opcode_t, cookie_t> vm_tool_dispatch_t::get_original_opcode_and_cooki · 4 unmodified lines | |||
| 375 | if (iter_orig != _breakpoints.original_opcodes.cend()) | 374 | if (iter_orig != _breakpoints.original_opcodes.cend()) |
| 376 | { | 375 | { |
| 377 | auto &pc_map = iter_orig->second; | 376 | auto &pc_map = iter_orig->second; |
| 378 | auto iter_pc = pc_map.find(current_pc); | 377 | auto iter_pc = pc_map.find(r.pc); |
| 379 | if (iter_pc != pc_map.cend()) | 378 | if (iter_pc != pc_map.cend()) |
| 380 | return iter_pc->second; | 379 | return iter_pc->second; |
| 381 | } | 380 | } |