MCPcopy Create free account
hub / github.com/F-Stack/f-stack / stack_capture

Function stack_capture

freebsd/x86/x86/stack_machdep.c:73–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71#endif
72
73static void
74stack_capture(struct thread *td, struct stack *st, register_t fp)
75{
76 x86_frame_t frame;
77 vm_offset_t callpc;
78
79 stack_zero(st);
80 frame = (x86_frame_t)fp;
81 while (1) {
82 if (!kstack_contains(td, (vm_offset_t)frame, sizeof(*frame)))
83 break;
84 callpc = frame->f_retaddr;
85 if (!INKERNEL(callpc))
86 break;
87 if (stack_put(st, callpc) == -1)
88 break;
89 if (frame->f_frame <= frame)
90 break;
91 frame = frame->f_frame;
92 }
93}
94
95#ifdef SMP
96void

Callers 3

stack_capture_intrFunction · 0.70
stack_save_tdFunction · 0.70
stack_saveFunction · 0.70

Calls 3

stack_zeroFunction · 0.85
kstack_containsFunction · 0.85
stack_putFunction · 0.85

Tested by

no test coverage detected