github.com/eh-steve/goloader@v0.0.0-20240111193454-90ff3cfdae39/obj/inlinedcall.1.12.go (about) 1 //go:build go1.12 && !go1.20 2 // +build go1.12,!go1.20 3 4 package obj 5 6 type funcID uint8 7 8 // inlinedCall is the encoding of entries in the FUNCDATA_InlTree table. 9 type InlinedCall struct { 10 parent uint16 // index of parent in the inltree, or < 0 11 funcID funcID // type of the called function 12 _ byte 13 file uint32 // fileno index into filetab 14 line uint32 // line number of the call site 15 func_ uint32 // offset into pclntab for name of called function 16 parentPc uint32 // position of an instruction whose source position is the call site (offset from entry) 17 } 18 19 func InitInlinedCall(inl InlTreeNode, funcid uint8, namemap map[string]int, filetab []uint32) InlinedCall { 20 return InlinedCall{ 21 parent: uint16(inl.Parent), 22 funcID: funcID(funcid), 23 file: findFileTab(inl.File, namemap, filetab), 24 line: uint32(inl.Line), 25 func_: uint32(namemap[inl.Func]), 26 parentPc: uint32(inl.ParentPC)} 27 }