debug: golang.org/x/debug/arch Index | Files

package arch

import "golang.org/x/debug/arch"

Package arch contains architecture-specific definitions.

Index

Package Files

arch.go

Constants

const MaxBreakpointSize = 4 // TODO

Variables

var AMD64 = Architecture{
    BreakpointSize:  1,
    IntSize:         8,
    PointerSize:     8,
    ByteOrder:       binary.LittleEndian,
    FloatByteOrder:  binary.LittleEndian,
    BreakpointInstr: [MaxBreakpointSize]byte{0xCC},
}
var ARM = Architecture{
    BreakpointSize:  4,
    IntSize:         4,
    PointerSize:     4,
    ByteOrder:       binary.LittleEndian,
    FloatByteOrder:  binary.LittleEndian,
    BreakpointInstr: [MaxBreakpointSize]byte{0x00, 0x00, 0x00, 0x00},
}
var X86 = Architecture{
    BreakpointSize:  1,
    IntSize:         4,
    PointerSize:     4,
    ByteOrder:       binary.LittleEndian,
    FloatByteOrder:  binary.LittleEndian,
    BreakpointInstr: [MaxBreakpointSize]byte{0xCC},
}

type Architecture

type Architecture struct {
    // BreakpointSize is the size of a breakpoint instruction, in bytes.
    BreakpointSize int
    // IntSize is the size of the int type, in bytes.
    IntSize int
    // PointerSize is the size of a pointer, in bytes.
    PointerSize int
    // ByteOrder is the byte order for ints and pointers.
    ByteOrder binary.ByteOrder
    // FloatByteOrder is the byte order for floats.
    FloatByteOrder  binary.ByteOrder
    BreakpointInstr [MaxBreakpointSize]byte
}

Architecture defines the architecture-specific details for a given machine.

func (*Architecture) Complex128

func (a *Architecture) Complex128(buf []byte) complex128

func (*Architecture) Complex64

func (a *Architecture) Complex64(buf []byte) complex64

func (*Architecture) Float32

func (a *Architecture) Float32(buf []byte) float32

func (*Architecture) Float64

func (a *Architecture) Float64(buf []byte) float64

func (*Architecture) Int

func (a *Architecture) Int(buf []byte) int64

func (*Architecture) Int16

func (a *Architecture) Int16(buf []byte) int16

func (*Architecture) Int32

func (a *Architecture) Int32(buf []byte) int32

func (*Architecture) Int64

func (a *Architecture) Int64(buf []byte) int64

func (*Architecture) IntN

func (a *Architecture) IntN(buf []byte) int64

func (*Architecture) Uint

func (a *Architecture) Uint(buf []byte) uint64

func (*Architecture) Uint16

func (a *Architecture) Uint16(buf []byte) uint16

func (*Architecture) Uint32

func (a *Architecture) Uint32(buf []byte) uint32

func (*Architecture) Uint64

func (a *Architecture) Uint64(buf []byte) uint64

func (*Architecture) UintN

func (a *Architecture) UintN(buf []byte) uint64

func (*Architecture) Uintptr

func (a *Architecture) Uintptr(buf []byte) uint64

Package arch imports 2 packages (graph) and is imported by 1 packages. Updated about a month ago. Refresh now. Tools for package owners.