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

Function stack_save_td

freebsd/arm/arm/stack_machdep.c:69–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69int
70stack_save_td(struct stack *st, struct thread *td)
71{
72 struct unwind_state state;
73
74 THREAD_LOCK_ASSERT(td, MA_OWNED);
75 KASSERT(!TD_IS_SWAPPED(td),
76 ("stack_save_td: thread %p is swapped", td));
77
78 if (TD_IS_RUNNING(td))
79 return (EOPNOTSUPP);
80
81 state.registers[FP] = td->td_pcb->pcb_regs.sf_r11;
82 state.registers[SP] = td->td_pcb->pcb_regs.sf_sp;
83 state.registers[LR] = td->td_pcb->pcb_regs.sf_lr;
84 state.registers[PC] = td->td_pcb->pcb_regs.sf_pc;
85
86 stack_capture(st, &state);
87 return (0);
88}

Callers 4

kdb_backtrace_threadFunction · 0.50
sysctl_kern_proc_kstackFunction · 0.50
sleepq_sbuf_print_stacksFunction · 0.50
tty_infoFunction · 0.50

Calls 1

stack_captureFunction · 0.70

Tested by

no test coverage detected