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

Method FinalUserspaceFrame

pkg/callstack/callstack.go:238–252  ·  view source on GitHub ↗

FinalUserspaceFrame returns the final userspace frame. This frame is typically backed by the ntdll module.

()

Source from the content-addressed store, hash-verified

236// FinalUserspaceFrame returns the final userspace frame. This
237// frame is typically backed by the ntdll module.
238func (s *Callstack) FinalUserspaceFrame() *Frame {
239 if s.IsEmpty() {
240 return nil
241 }
242
243 for n := s.Depth() - 1; n > 0; n-- {
244 f := (*s)[n]
245 if f.Addr.InSystemRange() {
246 continue
247 }
248 return &f
249 }
250
251 return nil
252}
253
254// FinalKernelFrame returns the final kernel space frame.
255func (s *Callstack) FinalKernelFrame() *Frame {

Callers 3

TestCallstackFunction · 0.95
EvalMethod · 0.80
EvalMethod · 0.80

Calls 3

IsEmptyMethod · 0.95
DepthMethod · 0.95
InSystemRangeMethod · 0.80

Tested by 1

TestCallstackFunction · 0.76