Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial implementation of stepping back on Windows #47

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

donadigo
Copy link

@donadigo donadigo commented Jan 15, 2024

This is an initial implementation of saving previous steps when stepping through the process on Windows.

The command is available in the Control -> Step back menu. This feature works similarly to what is implemented in Visual Studio Enterprise. If you stepped through a specific line, you'll be able to step back to it and inspect all locals and call stack (even the objects that were not expanded before, or with different view rules). The snapshots are released once the target enters run state again (continue).

Internally, a new entity kind is created in df and demon that represents a snapshot. Snapshots are children of threads and are created using PssCaptureSnapshot which greatly simplifies the implementation as Windows takes care of doing all of the copy-on-write work that's required to preserve the state. Once a snapshot is activated, we just change the entity we are reading from.

Things to check:

  • potential bugs/annoyances?

@donadigo donadigo changed the title Draft: Initial implementation of stepping back on Windows Initial implementation of stepping back on Windows Jan 15, 2024
@donadigo donadigo marked this pull request as ready for review January 19, 2024 00:41
@GloriousPtr
Copy link
Contributor

Can't wait for this to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants