debug

package
v0.21.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2019 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InsnMap

type InsnMap struct {
	TrapMap
	Insns []InsnMapping
	// contains filtered or unexported fields
}

InsnMap implements compile.ObjectMapper. It stores all available function, call, trap and instruction information.

The WebAssembly module must be loaded using InsnMap's pass-through reader, or the source positions will be zero.

func (InsnMap) FindAddr added in v0.8.0

func (m InsnMap) FindAddr(retAddr uint32,
) (init bool, funcIndex, callIndex int, stackOffset int32, retInsnPos uint32)

func (*InsnMap) InitObjectMap

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

func (*InsnMap) PutDataBlock added in v0.8.0

func (m *InsnMap) PutDataBlock(objectPos uint32, blockLen int32)

func (*InsnMap) PutInsnAddr

func (m *InsnMap) PutInsnAddr(objectPos uint32)

func (*InsnMap) PutTrapSite added in v0.21.0

func (m *InsnMap) PutTrapSite(retAddr uint32, stackOffset int32)

func (*InsnMap) Reader added in v0.9.0

func (m *InsnMap) Reader(input reader.R) reader.R

Reader gets the pass-through reader. It must not be wrapped in a buffered reader (the input reader can be).

type InsnMapping

type InsnMapping struct {
	ObjectPos uint32 // Machine code offset in bytes.
	SourcePos uint32 // WebAssembly code offset in bytes.
	BlockLen  int32  // Length of data block (when SourcePos is 0).
}

Instruction mapping from machine code to WebAssembly. SourcePos is zero if ObjectPos contains non-executable data interleaved with the code.

type TrapMap added in v0.21.0

type TrapMap struct {
	object.CallMap                   // Function calls and recoverable (portable) traps.
	TrapSites      []object.CallSite // Unrecoverable (or nonportable) traps.
}

TrapMap implements compile.ObjectMapper. It stores function addresses, and all call and trap sites. Instruction information is not stored.

func (TrapMap) FindAddr added in v0.21.0

func (m TrapMap) FindAddr(retAddr uint32,
) (init bool, funcIndex, callIndex int, stackOffset int32, retInsnPos uint32)

func (*TrapMap) PutTrapSite added in v0.21.0

func (m *TrapMap) PutTrapSite(retAddr uint32, stackOffset int32)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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