MCPcopy Index your code
hub / github.com/dispatchrun/wzprof / preparePython

Function preparePython

python.go:61–73  ·  view source on GitHub ↗
(mod wazero.CompiledModule)

Source from the content-addressed store, hash-verified

59}
60
61func preparePython(mod wazero.CompiledModule) (*python, error) {
62 p, err := newDwarfparser(mod)
63 if err != nil {
64 return nil, fmt.Errorf("could not build dwarf parser: %w", err)
65 }
66 runtimeAddr := pythonAddress(p, runtimeAddrName)
67 if runtimeAddr == 0 {
68 return nil, fmt.Errorf("could not find python runtime address")
69 }
70 return &python{
71 pyrtaddr: ptr32(runtimeAddr),
72 }, nil
73}
74
75func pythonAddress(p dwarfparser, name string) uint32 {
76 for {

Callers 1

PrepareMethod · 0.85

Calls 3

newDwarfparserFunction · 0.85
pythonAddressFunction · 0.85
ptr32TypeAlias · 0.85

Tested by

no test coverage detected