github.com/pkujhd/goloader@v0.0.0-20240411034752-1a28096bd7bd/stackobject/stackobject.1.12.go (about) 1 //go:build go1.12 && !go1.17 2 // +build go1.12,!go1.17 3 4 package stackobject 5 6 import ( 7 "unsafe" 8 ) 9 10 // A stackObjectRecord is generated by the compiler for each stack object in a stack frame. 11 // This record must match the generator code in cmd/compile/internal/gc/ssa.go:emitStackObjects. 12 type stackObjectRecord struct { 13 // offset in frame 14 // if negative, offset from varp 15 // if non-negative, offset from argp 16 off int 17 typ unsafe.Pointer 18 } 19 20 func setStackObjectPtr(obj *stackObjectRecord, ptr unsafe.Pointer, noptrdata uintptr) { 21 obj.typ = ptr 22 }