coreboot-v2: drop this ugly historic union name in v2 that was dropped in v3
[coreboot.git] / src / devices / emulator / x86emu / debug.c
index dd47e3d3a5a646c5fb8097ef34fcc61029fceca6..fea52bfd38e56c61f07522eb43b75f0aaa62935b 100644 (file)
@@ -52,7 +52,11 @@ static int      parse_line (char *s, int *ps, int *n);
 void X86EMU_trace_regs (void)
 {
     if (DEBUG_TRACE()) {
-        x86emu_dump_regs();
+       if (M.x86.mode & (SYSMODE_PREFIX_DATA | SYSMODE_PREFIX_ADDR)) {
+            x86emu_dump_xregs();
+       } else {
+           x86emu_dump_regs();
+       }
     }
     if (DEBUG_DECODE() && ! DEBUG_DECODE_NOPRINT()) {
         printk("%04x:%04x ",M.x86.saved_cs, M.x86.saved_ip);
@@ -185,7 +189,7 @@ static void print_encoded_bytes (u16 s, u16 o)
     for (i=0; i< M.x86.enc_pos; i++) {
         sprintf(buf1+2*i,"%02x", fetch_data_byte_abs(s,o+i));
     }
-    printk("%-20s",buf1);
+    printk("%-20s ",buf1);
 }
 
 static void print_decoded_instruction (void)
@@ -225,6 +229,7 @@ void X86EMU_dump_memory (u16 seg, u16 off, u32 amt)
 
 void x86emu_single_step (void)
 {
+#if 0
     char s[1024];
     int ps[10];
     int ntok;
@@ -313,6 +318,7 @@ void x86emu_single_step (void)
             break;
         }
     }
+#endif
 }
 
 int X86EMU_trace_on(void)
@@ -327,6 +333,7 @@ int X86EMU_trace_off(void)
 
 static int parse_line (char *s, int *ps, int *n)
 {
+#if 0
     int cmd;
 
     *n = 0;
@@ -352,6 +359,9 @@ static int parse_line (char *s, int *ps, int *n)
         sscanf(s,"%x",&ps[*n]);
         *n += 1;
     }
+#else
+    return 0;
+#endif
 }
 
 #endif /* DEBUG */