--- np2/debugsub386.c 2004/03/09 16:31:17 1.3 +++ np2/debugsub386.c 2004/03/23 04:45:03 1.7 @@ -149,19 +149,19 @@ const char *p; SPRINTF(work, str_picstat, pic.pi[0].imr, pic.pi[0].irr, pic.pi[0].isr, pic.pi[1].imr, pic.pi[1].irr, pic.pi[1].isr, - mouseif.portc, sysport.c); + mouseif.upd8255.portc, sysport.c); file_write(fh, work, strlen(work)); file_close(fh); } SPRINTF(work, file_i386cs, filenum); - debugwriteseg(work, &CPU_STAT_SREG(CPU_CS_INDEX), 0, 0x10000); + debugwriteseg(work, &CPU_STAT_SREG(CPU_CS_INDEX), CPU_EIP & 0xffff0000, 0x10000); SPRINTF(work, file_i386ds, filenum); debugwriteseg(work, &CPU_STAT_SREG(CPU_DS_INDEX), 0, 0x10000); SPRINTF(work, file_i386es, filenum); debugwriteseg(work, &CPU_STAT_SREG(CPU_ES_INDEX), 0, 0x10000); SPRINTF(work, file_i386ss, filenum); - debugwriteseg(work, &CPU_STAT_SREG(CPU_SS_INDEX), 0, 0x10000); + debugwriteseg(work, &CPU_STAT_SREG(CPU_SS_INDEX), CPU_ESP & 0xffff0000, 0x10000); filenum++; } @@ -181,6 +181,20 @@ void debugsub_memorydump(void) { } } +void debugsub_memorydumpall(void) { + + FILEH fh; + + fh = file_create_c(file_memorybin); + if (fh != FILEH_INVALID) { + file_write(fh, mem, 0x110000); + if (CPU_EXTMEMSIZE > 0x10000) { + file_write(fh, CPU_EXTMEM + 0x10000, CPU_EXTMEMSIZE - 0x10000); + } + file_close(fh); + } +} + #if 1 // ²¶ÍѥǥХ°