github.com/pkujhd/goloader@v0.0.0-20240411034752-1a28096bd7bd/obj/inlinedcall.1.20.go (about) 1 //go:build go1.20 && !go1.23 2 // +build go1.20,!go1.23 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 funcID funcID // type of the called function 11 _ [3]byte 12 nameOff int32 // offset into pclntab for name of called function 13 parentPc int32 // position of an instruction whose source position is the call site (offset from entry) 14 startLine int32 // line number of start of function (func keyword/TEXT directive) 15 } 16 17 func InitInlinedCall(inl InlTreeNode, funcid uint8, namemap map[string]int, filetab []uint32) InlinedCall { 18 return InlinedCall{ 19 funcID: funcID(funcid), 20 startLine: int32(inl.Line), 21 nameOff: int32(namemap[inl.Func]), 22 parentPc: int32(inl.ParentPC)} 23 }