FreeBSD/sys/kern/subr_kdb.c
/*
 * Enter the currently selected debugger. If a message has been provided,
 * it is printed first. If the debugger does not support the enter method,
 * it is entered by using breakpoint(), which enters the debugger through
 * kdb_trap().  The 'why' argument will contain a more mechanically usable
 * string than 'msg', and is relied upon by DDB scripting to identify the
 * reason for entering the debugger so that the right script can be run.
 */
Enter the currently selected debugger. If a message has been provided,
it is printed first. If the debugger does not support the enter method,
it is entered by using breakpoint(), which enters the debugger through
kdb_trap().  The 'why' argument will contain a more mechanically usable
string than 'msg', and is relied upon by DDB scripting to identify the
reason for entering the debugger so that the right script can be run.
Enter the currently selected debugger . If a message has been provided it is printed first . If the debugger does not support the enter method it is entered by using breakpoint () which enters the debugger through kdb_trap () . The ' why ' argument will contain a more mechanically usable string than ' msg ' and is relied upon by DDB scripting to identify the reason for entering the debugger so that the right script can be run .
void
kdb_enter(const char *why, const char *msg)
{
	if (kdb_dbbe != NULL && kdb_active == 0) {
		if (msg != NULL)
			printf("KDB: enter: %s\n", msg);
		kdb_why = why;
		breakpoint();
		kdb_why = KDB_WHY_UNSET;
	}
}
void kdb_enter ( const char * why , const char * msg ) { if ( kdb_dbbe != NULL && kdb_active == 0 ) { if ( msg != NULL ) printf ( " \n " , msg ) ; kdb_why = why ; breakpoint ( ) ; kdb_why = KDB_WHY_UNSET ; } }
Enter the currently selected debugger.
Enter the currently selected debugger .