// End calculates the return address of this function given the current stack
// frame. It is assumed that a call instruction has just been executed, so the
// return address is at the top of the stack.
End calculates the return address of this function given the current stack
frame. It is assumed that a call instruction has just been executed, so the
return address is at the top of the stack.
// End calculates the return address of this function given the current stack // frame . It is assumed that a call instruction has just been executed so the // return address is at the top of the stack .
func (f *FuncRegion) End(sp uint64, p *Proc) (uint64, error) {
	b := make([]byte, 8)
	_, err := p.tracer.ReadVM(uintptr(sp), b)
	if err != nil {
		return 0, err
	}
	retaddr := binary.LittleEndian.Uint64(b)
	return retaddr, nil
}
func ( f * FuncRegion ) End ( sp uint64 , p * Proc ) ( uint64 , error ) { b := make ( [ ] byte , 8 ) _ , err := p . tracer . ReadVM ( uintptr ( sp ) , b ) if err != nil { return 0 , err } retaddr := binary . LittleEndian . Uint64 ( b ) return retaddr , nil }
End calculates the return address of this function given the current stack
frame.
End calculates the return address of this function given the current stack frame .
// read the return address from the top of the stack