-
Notifications
You must be signed in to change notification settings - Fork 0
Undo v1.23.1 #47
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
Draft
mark-undoio
wants to merge
19
commits into
upstream-v1.23.1
Choose a base branch
from
undo-v1.23.1
base: upstream-v1.23.1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Undo v1.23.1 #47
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In Undo, debuggee state is immutable during replay, so reading the G pointer via code injection won't work; and in any case, this approach is simpler.
* Update the documentation to mention UDB or LiveRecorder alongside rr. * Add makefile support for testing the Undo backend. * Add DLV_RECORD_REPLAY_BACKEND environment variable which overrides the record-replay backend, for use in GoLand. * Implement checkpoints as a map from checkpoint number to time. * Suppress resume call after restart. * Implement "when" command using "get_time" serial command. * Implement call injection using "set_debuggee_volatile". * Implement "restart" using "goto_time". * Enable or disable Undo backend appropriately in test cases.
This fixes a bug in which it was not possible to reverse debug after a stepping operation e.g. next encountered the end of recorded history.
The error handling here was a bit painful but only needs doing in these two places (for now).
This is made compatible with UDB's bookmarks by using the UDB bookmark name as the "Note" field in Delve. To save Delve checkpoints, the "Note" must be made unique, so as to be a valid bookmark name in UDB.
This avoids us creating an invalid JSON file when the content we're writing out is smaller than the previous contents.
This updates the start-up of the replay session to obtain the local path to the debuggee binary, which Delve wants to look up symbol information. By doing this, it's possible to debug a recording even when the original binary is no longer present or was at a different path on the machine that created the recording.
Otherwise a backwards continue to the start of time does not emit the expected "stop" packet, causing the debugger to loop forever.
pkg/proc/gdbserial/undo.go
Outdated
@@ -512,7 +512,8 @@ func UndoIsAvailable() error { | |||
|
|||
for _, cmd := range cmds { | |||
if _, err := exec.LookPath(cmd); err != nil { | |||
return &ErrBackendUnavailable{} | |||
return &ErrBackendUnavailable{ | |||
Detail: "unable to find an Undo v8.2.0+ installation on the current PATH"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the MinimumVersion
value here would be nice, hoisting it to the start of this function.
`udbserver` is now in the `tools` directory - we don't need to worry about supporting old directory layouts because older UDB will not support this Delve.
258c2f0
to
d5bc2e2
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Work-in-progress update of Undo's Delve support to v1.23.1, bringing us in line with upstream's latest.
Note that some accompanying changes to
udbserver
(to support new Delve behaviours) and the Undo Engine (to support new Go standard library behaviours) are required for this to work.