--- np2/i386c/ia32/interface.c 2003/12/25 20:30:22 1.4 +++ np2/i386c/ia32/interface.c 2004/01/13 16:34:19 1.6 @@ -1,4 +1,4 @@ -/* $Id: interface.c,v 1.4 2003/12/25 20:30:22 yui Exp $ */ +/* $Id: interface.c,v 1.6 2004/01/13 16:34:19 monaka Exp $ */ /* * Copyright (c) 2002-2003 NONAKA Kimihiro @@ -201,14 +201,21 @@ ia32_interrupt(BYTE vect) void ia32_panic(const char *str, ...) { + extern char *cpu_reg2str(void); char buf[1024]; va_list ap; + va_start(ap, str); vsnprintf(buf, sizeof(buf), str, ap); va_end(ap); strcat(buf, "\n"); +#if defined(_WIN32) + MessageBox(NULL, buf, "ia32_panic", MB_OK); +#endif + fprintf(stderr, buf); + fprintf(stderr, cpu_reg2str()); __ASSERT(0); exit(1); }