plat/linux68k/emu/sim.c
void exit_error(char* fmt, ...)
{
	static int guard_val = 0;
	char buff[100];
	uint32_t pc;
	va_list args;

	if(guard_val)
		return;
	else
		guard_val = 1;

	va_start(args, fmt);
	vfprintf(stderr, fmt, args);
	va_end(args);
	fprintf(stderr, "\n");
	pc = m68k_get_reg(NULL, M68K_REG_PPC);
	m68k_disassemble(buff, pc, M68K_CPU_TYPE_68020);
	fprintf(stderr, "At %04x: %s\n", pc, buff);

	exit(EXIT_FAILURE);
}
/* Exit with an error message.  Use printf syntax. */
Exit with an error message.  Use printf syntax.
Exit with an error message . Use printf syntax .
void exit_error(char* fmt, ...)
{
	static int guard_val = 0;
	char buff[100];
	uint32_t pc;
	va_list args;
	if(guard_val)
		return;
	else
		guard_val = 1;
	va_start(args, fmt);
	vfprintf(stderr, fmt, args);
	va_end(args);
	fprintf(stderr, "\n");
	pc = m68k_get_reg(NULL, M68K_REG_PPC);
	m68k_disassemble(buff, pc, M68K_CPU_TYPE_68020);
	fprintf(stderr, "At %04x: %s\n", pc, buff);
	exit(EXIT_FAILURE);
}
void exit_error ( char * fmt , ... ) { static int guard_val = 0 ; char buff [ 100 ] ; uint32_t pc ; va_list args ; if ( guard_val ) return ; else guard_val = 1 ; va_start ( args , fmt ) ; vfprintf ( stderr , fmt , args ) ; va_end ( args ) ; fprintf ( stderr , " \n " ) ; pc = m68k_get_reg ( NULL , M68K_REG_PPC ) ; m68k_disassemble ( buff , pc , M68K_CPU_TYPE_68020 ) ; fprintf ( stderr , " \n " , pc , buff ) ; exit ( EXIT_FAILURE ) ; }
Exit with an error message.
Exit with an error message .