History

Basic debugger implementation - No way to enable it without altering exec main.cpp.

arr committed 10 years ago

Commit f2c6ef31 parent 7c21b7718 files · +776 −72Browse files

Showing the changes to src/vm/vm_exception_handler.cpp (1 of 18 files). Show all

Unified · Split

src/vm/vm_exception_handler.cpp+3−3
@@ -54,7 +54,7 @@ std::tuple<const handler_t *, vm_frame_t *, vm_pc_t> disvm::runtime::find_except · 53 unmodified lines
5454 }
5555
5656 // Decrement the frame program counter. See raise instruction for details.
57− current_pc = static_cast<word_t>(current_frame->prev_pc() - 1);
57+ current_pc = current_frame->prev_pc() - 1;
5858
5959 // Update the current module if it changes walking up the stack.
6060 auto prev_mod_ref = current_frame->prev_module_ref();
@@ -66,6 +66,6 @@ std::tuple<const handler_t *, vm_frame_t *, vm_pc_t> disvm::runtime::find_except · 5 unmodified lines
6666 ++unwind_depth;
6767 }
6868
69− auto faulting_module_name = faulting_module.module->module_name->str();
70− throw unhandled_user_exception{ exception_id.str(), faulting_module_name, faulting_pc };
69+ // No handler found, return all invalid values.
70+ return std::make_tuple(nullptr, nullptr, runtime_constants::invalid_program_counter);
7171 }