FreeBSD/sys/ddb/db_break.c
/*
 * Set a temporary breakpoint.
 * The instruction is changed immediately,
 * so the breakpoint does not have to be on the breakpoint list.
 */
Set a temporary breakpoint.
The instruction is changed immediately,
so the breakpoint does not have to be on the breakpoint list.
Set a temporary breakpoint . The instruction is changed immediately so the breakpoint does not have to be on the breakpoint list .
db_breakpoint_t
db_set_temp_breakpoint(db_addr_t addr)
{
	register db_breakpoint_t	bkpt;
	bkpt = db_breakpoint_alloc();
	if (bkpt == 0) {
	    db_printf("Too many breakpoints.\n");
	    return 0;
	}
	bkpt->map = NULL;
	bkpt->address = addr;
	bkpt->flags = BKPT_TEMP;
	bkpt->init_count = 1;
	bkpt->count = 1;
	BKPT_WRITE(bkpt->address, &bkpt->bkpt_inst);
	return bkpt;
}
db_breakpoint_t db_set_temp_breakpoint ( db_addr_t addr ) { register db_breakpoint_t bkpt ; bkpt = db_breakpoint_alloc ( ) ; if ( bkpt == 0 ) { db_printf ( " \n " ) ; return 0 ; } bkpt -> map = NULL ; bkpt -> address = addr ; bkpt -> flags = BKPT_TEMP ; bkpt -> init_count = 1 ; bkpt -> count = 1 ; BKPT_WRITE ( bkpt -> address , & bkpt -> bkpt_inst ) ; return bkpt ; }
Set a temporary breakpoint.
Set a temporary breakpoint .