[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Time Travel Debugging
- From: Abhijit Nandy <abhijit.nandy@...>
- Date: Fri, 1 Nov 2019 15:36:43 +0530
So a useful case maybe to hit a breakpoint and change a variable's value. Then resume execution to see what happens. If it doesn't work out then reverting the virtual machine to the same state as it was when the machine hit the breakpoint. And again changing the value to something more suitable and executing forward.
Is it possible to save the Lua VM state and restore it or can it be done with some changes to lvm.c? It seems saving the stack and global state should be enough. Any userdata may be tricky.
I guess variables changes can be tracked by inserting local _ENVs within all functions and their entire value set saved. But executing forward and being able to return to a previous point requires snapshotting the LVM state.