Enable extra debugging.
authorKevin O'Connor <kevin@koconnor.net>
Fri, 29 Feb 2008 05:21:27 +0000 (00:21 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Fri, 29 Feb 2008 05:21:27 +0000 (00:21 -0500)
Route BX_INFO to debug port.
Add a new debug_stub() function.

src/output.c
src/post.c
src/util.h

index 6c7f71989f5006f5c46448d48e0afb37cec4fb2d..043caa2762c0e58d49672ff5401e9c16e31d2425 100644 (file)
@@ -140,6 +140,7 @@ bprintf(u16 action, const char *fmt, ...)
             puts_cs(action, sarg);
             break;
         default:
+            putc(action, '%');
             putc(action, *s);
             n = s;
         }
@@ -178,3 +179,9 @@ __debug_exit(const char *fname, struct bregs *regs)
         return;
     dump_regs(fname, "exit", regs);
 }
+
+void
+__debug_stub(const char *fname, struct bregs *regs)
+{
+    dump_regs(fname, "stub", regs);
+}
index f19c44ae837cd845e924d6af7806664f1fe6707c..07f0a2b90cf39d8fc8043ed8e9297e157312631c 100644 (file)
@@ -537,7 +537,7 @@ post()
     if (status != 0x00 && status != 0x09 && status < 0x0d)
         status_restart(status);
 
-    BX_INFO("Start bios");
+    BX_INFO("Start bios\n");
 
     init_bda();
     init_handlers();
index 53281b5e92dac6e185e877feb05f15345cd79088..cdb8b1bd8429116b9c9205be4ec3827cf650ff39 100644 (file)
@@ -39,7 +39,7 @@ static inline void nop(void)
 
 #define DEBUGF(fmt, args...)
 #define BX_PANIC(fmt, args...)
-#define BX_INFO(fmt, args...)
+#define BX_INFO(fmt, args...) bprintf(0, fmt , ##args)
 
 static inline void
 memset(void *s, int c, size_t n)
@@ -97,10 +97,13 @@ void bprintf(u16 action, const char *fmt, ...)
     __attribute__ ((format (printf, 2, 3)));
 void __debug_enter(const char *fname, struct bregs *regs);
 void __debug_exit(const char *fname, struct bregs *regs);
+void __debug_stub(const char *fname, struct bregs *regs);
 #define debug_enter(regs) \
     __debug_enter(__func__, regs)
 #define debug_exit(regs) \
     __debug_exit(__func__, regs)
+#define debug_stub(regs) \
+    __debug_stub(__func__, regs)
 #define printf(fmt, args...)                     \
     bprintf(1, fmt , ##args )