arch

package
v0.57.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package arch contains architecture-specific definitions.

Index

Constants

View Source
const MaxBreakpointSize = 4 // TODO

Variables

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

Functions

This section is empty.

Types

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL