Versions in this module Expand all Collapse all v1 v1.0.0 Nov 6, 2018 Changes in this version + var Testing bool + func CopyBytes(dst uintptr, src []byte, addNull bool) + func CopyString(dst uintptr, src string, addNull bool) + func DumpCode(w io.Writer, code []Operation, start int, funcs, lines []PCInfo) error + func DumpCodeStr(code []Operation, start int, funcs, lines []PCInfo) buffer.Bytes + func Exec(b *Binary, args []string, stdin io.Reader, stdout, stderr io.Writer, ...) (exitStatus int, err error) + func GoBytes(s uintptr) []byte + func GoBytesLen(s uintptr, len int) []byte + func GoString(s uintptr) string + func GoStringLen(s uintptr, len int) string + func GoUTF16String(s uintptr) string — windows/amd64 + func IsBuiltin(nm ir.NameID) bool + type Binary struct + BSS int + Code []Operation + DSRelative []byte + Data []byte + Functions []PCInfo + Lines []PCInfo + Sym map[ir.NameID]int + TSRelative []byte + Text []byte + func LoadMain(objects []ir.Object) (_ *Binary, err error) + func (b *Binary) LookupFunction(f string) (int, bool) + func (b *Binary) ReadFrom(r io.Reader) (n int64, err error) + func (b *Binary) WriteTo(w io.Writer) (n int64, err error) + type FFIArgument interface + type FFIResult interface + type Float64 int64 + type Float64Result struct + Value *float64 + type Int32 int32 + type Int32Result struct + Value *int32 + type Int64 int64 + type Int64Result struct + Value *int64 + type KillError struct + func (e KillError) Error() string + type Machine struct + ProfileFunctions map[PCInfo]int + ProfileInstructions map[Opcode]int + ProfileLines map[PCInfo]int + ProfileRate int + Threads []*Thread + func New(b *Binary, args []string, stdin io.Reader, stdout, stderr io.Writer, ...) (m *Machine, exitStatus int, err error) + func (m *Machine) CString(s string) uintptr + func (m *Machine) Close() (err error) + func (m *Machine) Kill() + func (m *Machine) NewThread(stackSize int) (*Thread, error) + type Opcode int + const AP + const AddC128 + const AddC64 + const AddF32 + const AddF64 + const AddI32 + const AddI64 + const AddPtr + const AddPtrs + const AddSP + const And16 + const And32 + const And64 + const And8 + const AreFileApisANSI + const Argument + const Argument16 + const Argument32 + const Argument64 + const Argument8 + const Arguments + const ArgumentsFP + const BP + const BitfieldI16 + const BitfieldI32 + const BitfieldI64 + const BitfieldI8 + const BitfieldU16 + const BitfieldU32 + const BitfieldU64 + const BitfieldU8 + const BoolC128 + const BoolF32 + const BoolF64 + const BoolI16 + const BoolI32 + const BoolI64 + const BoolI8 + const Call + const CallFP + const CloseHandle + const ConvC64C128 + const ConvF32C128 + const ConvF32C64 + const ConvF32F64 + const ConvF32I32 + const ConvF32I64 + const ConvF32U32 + const ConvF64C128 + const ConvF64F32 + const ConvF64I32 + const ConvF64I64 + const ConvF64I8 + const ConvF64U16 + const ConvF64U32 + const ConvF64U64 + const ConvI16I32 + const ConvI16I64 + const ConvI16U32 + const ConvI32C128 + const ConvI32C64 + const ConvI32F32 + const ConvI32F64 + const ConvI32I16 + const ConvI32I64 + const ConvI32I8 + const ConvI64 + const ConvI64F64 + const ConvI64I16 + const ConvI64I32 + const ConvI64I8 + const ConvI64U16 + const ConvI8F64 + const ConvI8I16 + const ConvI8I32 + const ConvI8I64 + const ConvI8U32 + const ConvU16I32 + const ConvU16I64 + const ConvU16U32 + const ConvU16U64 + const ConvU32F32 + const ConvU32F64 + const ConvU32I16 + const ConvU32I64 + const ConvU32U8 + const ConvU8I16 + const ConvU8I32 + const ConvU8U32 + const ConvU8U64 + const Copy + const Cpl32 + const Cpl64 + const Cpl8 + const CreateFileA + const CreateFileMappingA + const CreateFileMappingW + const CreateFileW + const CreateMutexW + const DS + const DSC128 + const DSI16 + const DSI32 + const DSI64 + const DSI8 + const DSN + const DeleteCriticalSection + const DeleteFileA + const DeleteFileW + const DivC128 + const DivC64 + const DivF32 + const DivF64 + const DivI32 + const DivI64 + const DivU32 + const DivU64 + const Dup32 + const Dup64 + const Dup8 + const EnterCriticalSection + const EqF32 + const EqF64 + const EqI32 + const EqI64 + const EqI8 + const Ext + const FFIReturn + const FP + const Field16 + const Field64 + const Field8 + const FlushFileBuffers + const FlushViewOfFile + const FormatMessageA + const FormatMessageW + const FreeLibrary + const Func + const GeqF32 + const GeqF64 + const GeqI32 + const GeqI64 + const GeqI8 + const GeqU32 + const GeqU64 + const GetCurrentProcessId + const GetCurrentThreadId + const GetDiskFreeSpaceA + const GetDiskFreeSpaceW + const GetFileAttributesA + const GetFileAttributesExW + const GetFileAttributesW + const GetFileSize + const GetFullPathNameA + const GetFullPathNameW + const GetLastError + const GetProcAddress + const GetProcessHeap + const GetSystemInfo + const GetSystemTime + const GetSystemTimeAsFileTime + const GetTempPathA + const GetTempPathW + const GetTickCount + const GetVersionExA + const GetVersionExW + const GtF32 + const GtF64 + const GtI32 + const GtI64 + const GtU32 + const GtU64 + const HeapAlloc + const HeapCompact + const HeapCreate + const HeapDestroy + const HeapFree + const HeapReAlloc + const HeapSize + const HeapValidate + const Index + const IndexI16 + const IndexI32 + const IndexI64 + const IndexI8 + const IndexU16 + const IndexU32 + const IndexU64 + const IndexU8 + const InitializeCriticalSection + const InterlockedCompareExchange + const Jmp + const JmpP + const Jnz + const Jz + const Label + const LeaveCriticalSection + const LeqF32 + const LeqF64 + const LeqI32 + const LeqI64 + const LeqI8 + const LeqU32 + const LeqU64 + const Load + const Load16 + const Load32 + const Load64 + const Load8 + const LoadLibraryA + const LoadLibraryW + const LocalFree + const LockFile + const LockFileEx + const LshI16 + const LshI32 + const LshI64 + const LshI8 + const LtF32 + const LtF64 + const LtI32 + const LtI64 + const LtU32 + const LtU64 + const MapViewOfFile + const MulC128 + const MulC64 + const MulF32 + const MulF64 + const MulI32 + const MulI64 + const MultiByteToWideChar + const NegF32 + const NegF64 + const NegI16 + const NegI32 + const NegI64 + const NegI8 + const NegIndexI32 + const NegIndexI64 + const NegIndexU16 + const NegIndexU32 + const NegIndexU64 + const NeqC128 + const NeqC64 + const NeqF32 + const NeqF64 + const NeqI32 + const NeqI64 + const NeqI8 + const Nop + const Not + const Or32 + const Or64 + const OutputDebugStringA + const OutputDebugStringW + const Panic + const PostIncF64 + const PostIncI16 + const PostIncI32 + const PostIncI64 + const PostIncI8 + const PostIncPtr + const PostIncU32Bits + const PostIncU64Bits + const PreIncI16 + const PreIncI32 + const PreIncI64 + const PreIncI8 + const PreIncPtr + const PreIncU32Bits + const PreIncU64Bits + const PtrDiff + const Push16 + const Push32 + const Push64 + const Push8 + const PushC128 + const QueryPerformanceCounter + const ReadFile + const RemI32 + const RemI64 + const RemU32 + const RemU64 + const Return + const RshI16 + const RshI32 + const RshI64 + const RshI8 + const RshU16 + const RshU32 + const RshU64 + const RshU8 + const SetEndOfFile + const SetFilePointer + const Sleep + const Store + const Store16 + const Store32 + const Store64 + const Store8 + const StoreBits16 + const StoreBits32 + const StoreBits64 + const StoreBits8 + const StoreC128 + const StrNCopy + const SubF32 + const SubF64 + const SubI32 + const SubI64 + const SubPtrs + const SwitchI32 + const SwitchI64 + const SystemTimeToFileTime + const Text + const UnlockFile + const UnlockFileEx + const UnmapViewOfFile + const Variable + const Variable16 + const Variable32 + const Variable64 + const Variable8 + const WaitForSingleObject + const WaitForSingleObjectEx + const WideCharToMultiByte + const WriteFile + const Xor32 + const Xor64 + const Zero16 + const Zero32 + const Zero64 + const Zero8 + func (i Opcode) String() string + type Operation struct + N int + type Option func(*options) error + func ProfileFunctions() Option + func ProfileInstructions() Option + func ProfileLines() Option + func ProfileRate(rate int) Option + type PCInfo struct + Column int + Line int + Name ir.NameID + PC int + func (p *PCInfo) Position() token.Position + type Ptr uintptr + type PtrResult struct + Value *uintptr + type Thread struct + func (c *Thread) AreFileApisANSI() + func (c *Thread) CloseHandle() + func (c *Thread) CreateFileA() + func (c *Thread) CreateFileMappingA() + func (c *Thread) CreateFileMappingW() + func (c *Thread) CreateFileW() + func (c *Thread) CreateMutexW() + func (c *Thread) DeleteCriticalSection() + func (c *Thread) DeleteFileA() + func (c *Thread) DeleteFileW() + func (c *Thread) EnterCriticalSection() + func (c *Thread) FlushFileBuffers() + func (c *Thread) FlushViewOfFile() + func (c *Thread) FormatMessageA() + func (c *Thread) FormatMessageW() + func (c *Thread) FreeLibrary() + func (c *Thread) GetCurrentProcessId() + func (c *Thread) GetCurrentThreadId() + func (c *Thread) GetDiskFreeSpaceA() + func (c *Thread) GetDiskFreeSpaceW() + func (c *Thread) GetFileAttributesA() + func (c *Thread) GetFileAttributesExW() + func (c *Thread) GetFileAttributesW() + func (c *Thread) GetFileSize() + func (c *Thread) GetFullPathNameA() + func (c *Thread) GetFullPathNameW() + func (c *Thread) GetLastError() + func (c *Thread) GetProcAddress() + func (c *Thread) GetProcessHeap() + func (c *Thread) GetSystemInfo() + func (c *Thread) GetSystemTime() + func (c *Thread) GetSystemTimeAsFileTime() + func (c *Thread) GetTempPathA() + func (c *Thread) GetTempPathW() + func (c *Thread) GetTickCount() + func (c *Thread) GetVersionExA() + func (c *Thread) GetVersionExW() + func (c *Thread) HeapAlloc() + func (c *Thread) HeapCompact() + func (c *Thread) HeapCreate() + func (c *Thread) HeapDestroy() + func (c *Thread) HeapFree() + func (c *Thread) HeapReAlloc() + func (c *Thread) HeapSize() + func (c *Thread) HeapValidate() + func (c *Thread) InitializeCriticalSection() + func (c *Thread) InterlockedCompareExchange() + func (c *Thread) LeaveCriticalSection() + func (c *Thread) LoadLibraryA() + func (c *Thread) LoadLibraryW() + func (c *Thread) LocalFree() + func (c *Thread) LockFile() + func (c *Thread) LockFileEx() + func (c *Thread) MapViewOfFile() + func (c *Thread) MultiByteToWideChar() + func (c *Thread) OutputDebugStringA() + func (c *Thread) OutputDebugStringW() + func (c *Thread) QueryPerformanceCounter() + func (c *Thread) ReadFile() + func (c *Thread) SetEndOfFile() + func (c *Thread) SetFilePointer() + func (c *Thread) Sleep() + func (c *Thread) SystemTimeToFileTime() + func (c *Thread) UnlockFile() + func (c *Thread) UnlockFileEx() + func (c *Thread) UnmapViewOfFile() + func (c *Thread) WaitForSingleObject() + func (c *Thread) WaitForSingleObjectEx() + func (c *Thread) WideCharToMultiByte() + func (c *Thread) WriteFile() + func (t *Thread) Close() error + func (t *Thread) FFI(fn int, out []FFIResult, in ...FFIArgument) (int, error) + func (t *Thread) FFI0(fn int, in ...FFIArgument) (int, error) + func (t *Thread) FFI1(fn int, out FFIResult, in ...FFIArgument) (int, error)