FreeBSD/sys/amd64/amd64/trap.c
/*
 * Double fault handler. Called when a fault occurs while writing
 * a frame for a trap/exception onto the stack. This usually occurs
 * when the stack overflows (such is the case with infinite recursion,
 * for example).
 */
Double fault handler. Called when a fault occurs while writing
a frame for a trap/exception onto the stack. This usually occurs
when the stack overflows (such is the case with infinite recursion,
for example).
Double fault handler . Called when a fault occurs while writing a frame for a trap / exception onto the stack . This usually occurs when the stack overflows ( such is the case with infinite recursion for example ) .
void
dblfault_handler(struct trapframe *frame)
{
#ifdef KDTRACE_HOOKS
	if (dtrace_doubletrap_func != NULL)
		(*dtrace_doubletrap_func)();
#endif
	printf("\nFatal double fault\n");
	printf("rip = 0x%lx\n", frame->tf_rip);
	printf("rsp = 0x%lx\n", frame->tf_rsp);
	printf("rbp = 0x%lx\n", frame->tf_rbp);
#ifdef SMP
	printf("cpuid = %d; ", PCPU_GET(cpuid));
	printf("apic id = %02x\n", PCPU_GET(apic_id));
#endif
	panic("double fault");
}
void dblfault_handler ( struct trapframe * frame ) { #ifdef KDTRACE_HOOKS if ( dtrace_doubletrap_func != NULL ) ( * dtrace_doubletrap_func ) ( ) ; #endif printf ( " \n \n " ) ; printf ( " \n " , frame -> tf_rip ) ; printf ( " \n " , frame -> tf_rsp ) ; printf ( " \n " , frame -> tf_rbp ) ; #ifdef SMP printf ( " " , PCPU_GET ( cpuid ) ) ; printf ( " \n " , PCPU_GET ( apic_id ) ) ; #endif panic ( " " ) ; }
Double fault handler.
Double fault handler .
/* two separate prints in case of a trap on an unmapped page */