delve/pkg/proc/arch.go

32 lines
993 B
Go
Raw Normal View History

2015-06-12 19:49:23 +00:00
package proc
import (
"github.com/go-delve/delve/pkg/dwarf/frame"
"github.com/go-delve/delve/pkg/dwarf/op"
)
2016-01-10 08:57:52 +00:00
// Arch defines an interface for representing a
// CPU architecture.
type Arch interface {
PtrSize() int
MaxInstructionLength() int
AsmDecode(asmInst *AsmInstruction, mem []byte, regs Registers, memrw MemoryReadWriter, bi *BinaryInfo) error
Prologues() []opcodeSeq
BreakpointInstruction() []byte
BreakInstrMovesPC() bool
BreakpointSize() int
DerefTLS() bool
FixFrameUnwindContext(*frame.FrameContext, uint64, *BinaryInfo) *frame.FrameContext
SwitchStack(it *stackIterator, callFrameRegs *op.DwarfRegisters) bool
RegSize(uint64) int
RegistersToDwarfRegisters(uint64, Registers) op.DwarfRegisters
AddrAndStackRegsToDwarfRegisters(uint64, uint64, uint64, uint64, uint64) op.DwarfRegisters
DwarfRegisterToString(string, *op.DwarfRegister) string
}
const (
crosscall2SPOffsetBad = 0x8
crosscall2SPOffsetWindows = 0x118
crosscall2SPOffsetNonWindows = 0x58
)