/* convert the FRV BRR register contents into a UNIX signal number  */
static int gdbstub_compute_signal(unsigned long tbr)
/* convert the FRV BRR register contents into a UNIX signal number  */
static int gdbstub_compute_signal(unsigned long tbr)
{
	const struct brr_to_sig_map *map;
	unsigned long tbr = (brr & BRR_EBTT) >> 12;
	for (map = brr_to_sig_map; map->brr_mask; map++)
		if (map->brr_mask & brr)
			if (!map->tbr_tt || map->tbr_tt == tbr)
				break;
	return map->signo;
}