コード例 #1
0
ファイル: step.c プロジェクト: cherry-wb/skyeye
static void check_steps(generic_arch_t* arch_instance){
	int current_step;
	if(arch_instance->get_step){
		current_step = arch_instance->get_step();
	}
	else
		return;
	if(!stopped_step)
		return;
	if(current_step == stopped_step){
		SIM_stop(arch_instance);
		stopped_step = 0;
	}
	return;
}
コード例 #2
0
ファイル: breakpoint.c プロジェクト: bboozzoo/skyeye-power
/*
 * Return: 1 means hit of breakpoint, 0 means not.
 */
static void check_breakpoint(generic_arch_t* arch_instance){
#if 1
	int i;
	for (i = 0;i < breakpoint_mgt.bp_number;i++){
		breakpoint_t* bp = &breakpoint_mgt.breakpoint[i];
		/* if id is zero, we think the bp is disabled now. */
		if(bp->id == 0)
			continue;
		/* return if any breakpoint at the address is hit */
		if(bp->address == arch_instance->get_pc()){
			//arch_instance->stop();
			bp->hits++;
			printf("The %d# breakpoint at address 0x%x is hit.\n", bp->id, bp->address);
			SIM_stop(arch_instance);
			return;
		}
	} /* for */
#endif
	return;
}