--- np2/debugsub386.c 2004/03/09 16:31:17 1.3 +++ np2/debugsub386.c 2004/03/30 07:12:02 1.9 @@ -6,6 +6,10 @@ #include "iocore.h" #include "debugsub.h" +void debugwriteseg(const char *fname, const descriptor_t *sd, + UINT32 addr, UINT32 size); +void debugpageptr(UINT32 addr); + #if defined(MACOS) #define CRLITERAL "\r" @@ -149,20 +153,22 @@ 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++; + + iptrace_out(); } void debugsub_memorydump(void) { @@ -181,6 +187,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 // ²¶ÍѥǥХ°