github.com/pkujhd/goloader@v0.0.0-20240411034752-1a28096bd7bd/obj/inlinedcall.1.9.go (about)

     1  //go:build go1.9 && !go1.12
     2  // +build go1.9,!go1.12
     3  
     4  package obj
     5  
     6  // inlinedCall is the encoding of entries in the FUNCDATA_InlTree table.
     7  type InlinedCall struct {
     8  	parent int32 // index of parent in the inltree, or < 0
     9  	file   int32 // fileno index into filetab
    10  	line   int32 // line number of the call site
    11  	func_  int32 // offset into pclntab for name of called function
    12  }
    13  
    14  func InitInlinedCall(inl InlTreeNode, funcid uint8, namemap map[string]int, filetab []uint32) InlinedCall {
    15  	return InlinedCall{
    16  		parent: int32(inl.Parent),
    17  		file:   FindFileTab(inl.File, namemap, filetab),
    18  		line:   int32(inl.Line),
    19  		func_:  int32(namemap[inl.Func])}
    20  }