FreeBSD/sys/amd64/amd64/machdep.c
/*
 * 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.
 */
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.
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 .
void
makectx(struct trapframe *tf, struct pcb *pcb)
{
	pcb->pcb_r12 = tf->tf_r12;
	pcb->pcb_r13 = tf->tf_r13;
	pcb->pcb_r14 = tf->tf_r14;
	pcb->pcb_r15 = tf->tf_r15;
	pcb->pcb_rbp = tf->tf_rbp;
	pcb->pcb_rbx = tf->tf_rbx;
	pcb->pcb_rip = tf->tf_rip;
	pcb->pcb_rsp = tf->tf_rsp;
}
void makectx ( struct trapframe * tf , struct pcb * pcb ) { pcb -> pcb_r12 = tf -> tf_r12 ; pcb -> pcb_r13 = tf -> tf_r13 ; pcb -> pcb_r14 = tf -> tf_r14 ; pcb -> pcb_r15 = tf -> tf_r15 ; pcb -> pcb_rbp = tf -> tf_rbp ; pcb -> pcb_rbx = tf -> tf_rbx ; pcb -> pcb_rip = tf -> tf_rip ; pcb -> pcb_rsp = tf -> tf_rsp ; }
Construct a PCB from a trapframe.
Construct a PCB from a trapframe .