MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / StackPID

Method StackPID

pkg/event/event_windows.go:268–276  ·  view source on GitHub ↗

StackPID returns the process id as seen the creator from the callstack execution perspective. For example, the pid associated with CreateProcess events is the parent, not the process being created.

()

Source from the content-addressed store, hash-verified

266// the pid associated with CreateProcess events is the
267// parent, not the process being created.
268func (e *Event) StackPID() uint32 {
269 if e.IsCreateProcess() {
270 if e.IsSurrogateProcess() {
271 return e.Params.MustGetUint32(params.ProcessRealParentID)
272 }
273 return e.Params.MustGetPpid()
274 }
275 return e.PID
276}
277
278// IsCreateRemoteThread indicates if the remote thread creation occurred.
279func (e *Event) IsCreateRemoteThread() bool {

Callers 2

processCallstackMethod · 0.80
produceFrameMethod · 0.80

Calls 4

IsCreateProcessMethod · 0.95
IsSurrogateProcessMethod · 0.95
MustGetUint32Method · 0.80
MustGetPpidMethod · 0.80

Tested by

no test coverage detected