mirror of
https://github.com/go-delve/delve.git
synced 2025-10-29 09:46:56 +08:00
Various fixes for go 1.22 (#3455)
* proc: correctly update local variables after continue At various point during the execution of the call injection protocol the process is resumed and the call injection goroutine could migrate to a different thread, we must make sure to update our local variables correctly after every point where the target program is resumed. 'fncall122debug_clean' on 'f469a0a5'. * go.mod: update golang.org/x/tools Go 1.22 broke golang.org/x/tools/packages * cmd/dlv: disable TestStaticcheck with go1.22 Go 1.22 is not yet supported by staticcheck.
This commit is contained in:
committed by
GitHub
parent
30b70bc606
commit
e0b4bfbed3
@ -493,6 +493,11 @@ func (scope *EvalScope) setValue(dstv, srcv *Variable, srcExpr string) error {
|
||||
if err := allocString(scope, srcv); err != nil {
|
||||
return err
|
||||
}
|
||||
if cm, ok := dstv.mem.(*compositeMemory); ok {
|
||||
// allocString can change the current thread, recover it so that the
|
||||
// registers are set on the correct thread.
|
||||
cm.regs.ChangeFunc = scope.callCtx.p.CurrentThread().SetReg
|
||||
}
|
||||
return dstv.writeString(uint64(srcv.Len), uint64(srcv.Base))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user