MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime-go / ModuleName

Method ModuleName

trap.go:183–192  ·  view source on GitHub ↗

ModuleName returns the name, if available, for this frame's module

()

Source from the content-addressed store, hash-verified

181
182// ModuleName returns the name, if available, for this frame's module
183func (f *Frame) ModuleName() *string {
184 ret := C.wasmtime_frame_module_name(f.ptr())
185 if ret == nil {
186 runtime.KeepAlive(f)
187 return nil
188 }
189 str := C.GoStringN(ret.data, C.int(ret.size))
190 runtime.KeepAlive(f)
191 return &str
192}
193
194// ModuleOffset returns offset of this frame's instruction into the original module
195func (f *Frame) ModuleOffset() uint {

Callers 1

TestTrapModuleNameFunction · 0.80

Calls 1

ptrMethod · 0.95

Tested by 1

TestTrapModuleNameFunction · 0.64