object

package
v0.31.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package object contains ObjectMapper implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindCallSite added in v0.21.0

func FindCallSite(a []CallSite, retAddr uint32) (i int, found bool)

Types

type CallMap

type CallMap struct {
	FuncMap
	CallSites []CallSite
}

CallMap implements compile.ObjectMapper. It stores function addresses, and sites of function calls and suspension points. Other trap and instruction information is not stored.

Initial CallSites capacity may be allocated by initializing the field with a non-nil, empty array.

func (*CallMap) FindCall added in v0.29.0

func (m *CallMap) FindCall(retAddr uint32,
) (init bool, funcIndex, callIndex int, stackOffset int32, retOffset uint32)

func (*CallMap) InitObjectMap

func (m *CallMap) InitObjectMap(numImportFuncs, numOtherFuncs int)

func (*CallMap) PutCallSite

func (m *CallMap) PutCallSite(retAddr uint32, stackOffset int32)

type CallSite

type CallSite struct {
	RetAddr     uint32 // The address immediately after the call instruction
	StackOffset int32  // Calling function's stack usage at time of call
}

CallSite represents an offset within the text section (machine code) where a function call is made.

The struct size or layout will not change between minor versions.

type FuncMap

type FuncMap struct {
	FuncAddrs []uint32
}

FuncMap implements compile.ObjectMapper. It stores function addresses, but no call, trap or instruction information.

FuncAddrs may be preallocated by initializing the field with a non-nil, empty array.

func (*FuncMap) FindCall added in v0.29.0

func (m *FuncMap) FindCall(retAddr uint32,
) (init bool, funcIndex, callIndex int, stackOffset int32, retOffset uint32)

func (*FuncMap) FindFunc added in v0.29.0

func (m *FuncMap) FindFunc(addr uint32) (index int, found bool)

func (*FuncMap) InitObjectMap

func (m *FuncMap) InitObjectMap(numImportFuncs, numOtherFuncs int)

func (*FuncMap) PutCallSite

func (*FuncMap) PutCallSite(uint32, int32)

func (*FuncMap) PutFuncAddr

func (m *FuncMap) PutFuncAddr(addr uint32)

Directories

Path Synopsis
Package debug contains DebugObjectMapper implementations.
Package debug contains DebugObjectMapper implementations.
Package stack provides runtime call stack manipulation functions.
Package stack provides runtime call stack manipulation functions.

Jump to

Keyboard shortcuts

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