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

Function makectx

freebsd/arm/arm/machdep.c:667–682  ·  view source on GitHub ↗

* Construct a PCB from a trapframe. This is called from kdb_trap() where * we want to start a backtrace from the function that caused us to enter * the debugger. We have the context in the trapframe, but base the trace * on the PCB. The PCB doesn't have to be perfect, as long as it contains * enough for a backtrace. */

Source from the content-addressed store, hash-verified

665 * enough for a backtrace.
666 */
667void
668makectx(struct trapframe *tf, struct pcb *pcb)
669{
670 pcb->pcb_regs.sf_r4 = tf->tf_r4;
671 pcb->pcb_regs.sf_r5 = tf->tf_r5;
672 pcb->pcb_regs.sf_r6 = tf->tf_r6;
673 pcb->pcb_regs.sf_r7 = tf->tf_r7;
674 pcb->pcb_regs.sf_r8 = tf->tf_r8;
675 pcb->pcb_regs.sf_r9 = tf->tf_r9;
676 pcb->pcb_regs.sf_r10 = tf->tf_r10;
677 pcb->pcb_regs.sf_r11 = tf->tf_r11;
678 pcb->pcb_regs.sf_r12 = tf->tf_r12;
679 pcb->pcb_regs.sf_pc = tf->tf_pc;
680 pcb->pcb_regs.sf_lr = tf->tf_usr_lr;
681 pcb->pcb_regs.sf_sp = tf->tf_usr_sp;
682}
683
684void
685pcpu0_init(void)

Callers 1

kdb_trapFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected