2015-06-12 19:49:23 +00:00
|
|
|
package proc
|
2015-04-29 17:07:27 +00:00
|
|
|
|
2017-10-05 07:26:19 +00:00
|
|
|
import (
|
2019-01-04 18:39:25 +00:00
|
|
|
"github.com/go-delve/delve/pkg/dwarf/frame"
|
|
|
|
"github.com/go-delve/delve/pkg/dwarf/op"
|
2017-10-05 07:26:19 +00:00
|
|
|
)
|
|
|
|
|
2016-01-10 08:57:52 +00:00
|
|
|
// Arch defines an interface for representing a
|
|
|
|
// CPU architecture.
|
2015-04-29 17:07:27 +00:00
|
|
|
type Arch interface {
|
|
|
|
PtrSize() int
|
2019-11-28 12:54:39 +00:00
|
|
|
MaxInstructionLength() int
|
|
|
|
AsmDecode(asmInst *AsmInstruction, mem []byte, regs Registers, memrw MemoryReadWriter, bi *BinaryInfo) error
|
|
|
|
Prologues() []opcodeSeq
|
2015-04-29 17:07:27 +00:00
|
|
|
BreakpointInstruction() []byte
|
2019-11-16 12:25:13 +00:00
|
|
|
BreakInstrMovesPC() bool
|
2015-04-29 17:07:27 +00:00
|
|
|
BreakpointSize() int
|
2017-02-15 13:41:03 +00:00
|
|
|
DerefTLS() bool
|
2019-08-08 03:15:20 +00:00
|
|
|
FixFrameUnwindContext(*frame.FrameContext, uint64, *BinaryInfo) *frame.FrameContext
|
2017-10-05 07:26:19 +00:00
|
|
|
RegSize(uint64) int
|
2019-08-08 03:15:20 +00:00
|
|
|
RegistersToDwarfRegisters(uint64, Registers) op.DwarfRegisters
|
2019-08-08 03:44:37 +00:00
|
|
|
AddrAndStackRegsToDwarfRegisters(uint64, uint64, uint64, uint64) op.DwarfRegisters
|
2015-04-29 17:07:27 +00:00
|
|
|
}
|
|
|
|
|
2017-09-01 13:34:13 +00:00
|
|
|
const (
|
|
|
|
crosscall2SPOffsetBad = 0x8
|
|
|
|
crosscall2SPOffsetWindows = 0x118
|
|
|
|
crosscall2SPOffsetNonWindows = 0x58
|
|
|
|
)
|