MCPcopy
hub / github.com/slimtoolkit/slim / onSyscallReturn

Function onSyscallReturn

pkg/monitor/ptrace/ptrace.go:1008–1023  ·  view source on GitHub ↗
(pid int, cstate *syscallState)

Source from the content-addressed store, hash-verified

1006}
1007
1008func onSyscallReturn(pid int, cstate *syscallState) error {
1009 var regs syscall.PtraceRegs
1010 if err := syscall.PtraceGetRegs(pid, &regs); err != nil {
1011 return err
1012 }
1013
1014 cstate.retVal = system.CallReturnValue(regs)
1015 cstate.expectReturn = false
1016 cstate.gotRetVal = true
1017
1018 if processor, found := syscallProcessors[int(cstate.callNum)]; found {
1019 processor.OnReturn(pid, regs, cstate)
1020 }
1021
1022 return nil
1023}
1024
1025///////////////////////////////////
1026

Callers 1

collectMethod · 0.85

Calls 2

CallReturnValueFunction · 0.92
OnReturnMethod · 0.65

Tested by

no test coverage detected