mirror of
https://github.com/go-delve/delve.git
synced 2025-10-28 04:35:19 +08:00
proc: fix RFLAGS corruption after call injection on amd64 (#3002)
debugCallV2 for amd64 has a bug where it corrupts the flags registers every time it is called, this commit works around that problem by restoring flags one extra time to its original value after stepping out of debugCallV2. Fixes #2985
This commit is contained in:
committed by
GitHub
parent
51090f003b
commit
b53fcbe43a
@ -1,6 +1,9 @@
|
||||
package proc
|
||||
|
||||
import "github.com/go-delve/delve/pkg/dwarf/op"
|
||||
import (
|
||||
"github.com/go-delve/delve/pkg/dwarf/op"
|
||||
"golang.org/x/arch/x86/x86asm"
|
||||
)
|
||||
|
||||
// PackageVars returns bi.packageVars (for tests)
|
||||
func (bi *BinaryInfo) PackageVars() []packageVar {
|
||||
@ -23,3 +26,7 @@ func NewCompositeMemory(p *Target, pieces []op.Piece, base uint64) (*compositeMe
|
||||
}
|
||||
return mem, err
|
||||
}
|
||||
|
||||
func IsJNZ(inst archInst) bool {
|
||||
return inst.(*x86Inst).Op == x86asm.JNE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user