Diff for /np2/i386c/ia32/debug.c between versions 1.1 and 1.2

version 1.1, 2003/12/08 00:55:31 version 1.2, 2004/01/13 16:32:36
Line 27 Line 27
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */   */
   
   #include "compiler.h"
   
 #include "cpu.h"  #include "cpu.h"
 #ifdef USE_FPU  #ifdef USE_FPU
  #include "instructions/fpu/fpu.h"  #include "instructions/fpu/fpu.h"
 #endif  #endif
   
   #if 0
 extern BOOL is_a20(void);       /* in ../cpuio.c */  extern BOOL is_a20(void);       /* in ../cpuio.c */
   #endif
   
 static char *cpu_reg2str(void)  char *cpu_reg2str(void)
 {  {
   static char buf[512];    static char buf[512];
   
Line 47  static char *cpu_reg2str(void) Line 51  static char *cpu_reg2str(void)
       "[ ID=%d VIP=%d VIF=%d AC=%d VM=%d RF=%d NT=%d IOPL=%d%d %s %s %s TF=%d %s %s %s %s %s ]\n"        "[ ID=%d VIP=%d VIF=%d AC=%d VM=%d RF=%d NT=%d IOPL=%d%d %s %s %s TF=%d %s %s %s %s %s ]\n"
     "gdtr=%08x:%04x idtr=%08x:%04x ldtr=%04x tr=%04x\n"      "gdtr=%08x:%04x idtr=%08x:%04x ldtr=%04x tr=%04x\n"
     "cr0=%08x cr1=%08x cr2=%08x cr3=%08x cr4=%08x mxcsr=%08x\n",      "cr0=%08x cr1=%08x cr2=%08x cr3=%08x cr4=%08x mxcsr=%08x\n",
     I286_EAX, I286_EBX, I286_ECX, I286_EDX, I286_ESI, I286_EDI,      CPU_EAX, CPU_EBX, CPU_ECX, CPU_EDX, CPU_ESI, CPU_EDI,
     I286_EIP, I286_ESP, I286_EBP, CPU_PREV_EIP,      CPU_EIP, CPU_ESP, CPU_EBP, CPU_PREV_EIP,
     I286_CS, I286_SS, I286_DS, I286_ES, I286_FS, I286_GS,      CPU_CS, CPU_SS, CPU_DS, CPU_ES, CPU_FS, CPU_GS,
     I286_EFLAG,      CPU_EFLAG,
       (I286_EFLAG & ID_FLAG) != 0,        (CPU_EFLAG & ID_FLAG) != 0,
       (I286_EFLAG & VIP_FLAG) != 0,        (CPU_EFLAG & VIP_FLAG) != 0,
       (I286_EFLAG & VIF_FLAG) != 0,        (CPU_EFLAG & VIF_FLAG) != 0,
       (I286_EFLAG & AC_FLAG) != 0,        (CPU_EFLAG & AC_FLAG) != 0,
       (I286_EFLAG & VM_FLAG) != 0,        (CPU_EFLAG & VM_FLAG) != 0,
       (I286_EFLAG & RF_FLAG) != 0,        (CPU_EFLAG & RF_FLAG) != 0,
       (I286_EFLAG & NT_FLAG) != 0,        (CPU_EFLAG & NT_FLAG) != 0,
       I286_EFLAG >> 13 & 1,        CPU_EFLAG >> 13 & 1,
       I286_EFLAG >> 12 & 1,        CPU_EFLAG >> 12 & 1,
       I286_EFLAG & O_FLAG ? "OV" : "NV",        CPU_EFLAG & O_FLAG ? "OV" : "NV",
       I286_EFLAG & D_FLAG ? "UP" : "DN",        CPU_EFLAG & D_FLAG ? "UP" : "DN",
       I286_EFLAG & I_FLAG ? "DI" : "EI",        CPU_EFLAG & I_FLAG ? "DI" : "EI",
       (I286_EFLAG & T_FLAG) != 0,        (CPU_EFLAG & T_FLAG) != 0,
       I286_EFLAG & S_FLAG ? "NG" : "PL",        CPU_EFLAG & S_FLAG ? "NG" : "PL",
       I286_EFLAG & Z_FLAG ? "ZR" : "NZ",        CPU_EFLAG & Z_FLAG ? "ZR" : "NZ",
       I286_EFLAG & A_FLAG ? "AC" : "NA",        CPU_EFLAG & A_FLAG ? "AC" : "NA",
       I286_EFLAG & P_FLAG ? "PE" : "PO",        CPU_EFLAG & P_FLAG ? "PE" : "PO",
       I286_EFLAG & C_FLAG ? "CY" : "NC",        CPU_EFLAG & C_FLAG ? "CY" : "NC",
     CPU_GDTR_BASE, CPU_GDTR_LIMIT, CPU_IDTR_BASE, CPU_IDTR_LIMIT, CPU_LDTR, CPU_TR,      CPU_GDTR_BASE, CPU_GDTR_LIMIT, CPU_IDTR_BASE, CPU_IDTR_LIMIT, CPU_LDTR, CPU_TR,
     CPU_CR0, CPU_CR1, CPU_CR2, CPU_CR3, CPU_CR4, CPU_MXCSR);      CPU_CR0, CPU_CR1, CPU_CR2, CPU_CR3, CPU_CR4, CPU_MXCSR);
   
Line 76  static char *cpu_reg2str(void) Line 80  static char *cpu_reg2str(void)
 }  }
   
 #ifdef USE_FPU  #ifdef USE_FPU
 static char *fpu_reg2str(void)  char *fpu_reg2str(void)
 {  {
   static char buf[512];    static char buf[512];
   char tmp[128];    char tmp[128];
Line 109  static char *fpu_reg2str(void) Line 113  static char *fpu_reg2str(void)
 }  }
 #endif  #endif
   
   #if 0
 static char *a20str(void)  static char *a20str(void)
 {  {
   static char buf[32];    static char buf[32];
Line 160  void FASTCALL msgbox_mem(DWORD no) Line 165  void FASTCALL msgbox_mem(DWORD no)
   strcat(buf, fpu_reg2str());    strcat(buf, fpu_reg2str());
   strcat(buf, "\n");    strcat(buf, "\n");
 #endif  #endif
   strcat(buf, mem2str(I286_CS, I286_IP));    strcat(buf, mem2str(CPU_CS, CPU_IP));
   strcat(buf, "\n");    strcat(buf, "\n");
   sprintf(tmp, "no=%08x\n", no);    sprintf(tmp, "no=%08x\n", no);
   strcat(buf, tmp);    strcat(buf, tmp);
Line 182  void put_cpuinfo(void) Line 187  void put_cpuinfo(void)
   
   printf(buf);    printf(buf);
 }  }
   #endif

Removed from v.1.1  
changed lines
  Added in v.1.2


RetroPC.NET-CVS <cvs@retropc.net>