Files
delve/pkg/proc/arch.go
hengwu0 f88899ea97 proc/native: fix SetCurrentBreakpoint on arm64
arm64 use hardware breakpoint, and it will not set PC to the next instruction like amd64. Let adjustPC always fasle in arm64, in case of infinite loop.
2019-11-27 11:07:31 -08:00

28 lines
722 B
Go

package proc
import (
"github.com/go-delve/delve/pkg/dwarf/frame"
"github.com/go-delve/delve/pkg/dwarf/op"
)
// Arch defines an interface for representing a
// CPU architecture.
type Arch interface {
PtrSize() int
MinInstructionLength() int
BreakpointInstruction() []byte
BreakInstrMovesPC() bool
BreakpointSize() int
DerefTLS() bool
FixFrameUnwindContext(*frame.FrameContext, uint64, *BinaryInfo) *frame.FrameContext
RegSize(uint64) int
RegistersToDwarfRegisters(uint64, Registers) op.DwarfRegisters
AddrAndStackRegsToDwarfRegisters(uint64, uint64, uint64, uint64) op.DwarfRegisters
}
const (
crosscall2SPOffsetBad = 0x8
crosscall2SPOffsetWindows = 0x118
crosscall2SPOffsetNonWindows = 0x58
)