Kernel/x86 - Added USE_ACPICA makefile variable to easily enable/disable
[tpg/acess2.git] / KernelLand / Kernel / debug.c
index dab20ad..6132bd9 100644 (file)
@@ -162,27 +162,47 @@ void Debug(const char *Fmt, ...)
        SHORTREL(&glDebug_Lock);
        #endif
 }
-/**
- * \fn void Log(const char *Msg, ...)
- */
-void Log(const char *Fmt, ...)
+
+
+void LogFV(const char *Fmt, va_list args)
 {
-       va_list args;
+       #if LOCK_DEBUG_OUTPUT
+       SHORTLOCK(&glDebug_Lock);
+       #endif
+
+       Debug_Fmt(1, Fmt, args);
        
+       #if LOCK_DEBUG_OUTPUT
+       SHORTREL(&glDebug_Lock);
+       #endif
+}
+
+void LogV(const char *Fmt, va_list args)
+{
        #if LOCK_DEBUG_OUTPUT
        SHORTLOCK(&glDebug_Lock);
        #endif
 
        Debug_Puts(1, "Log: ");
-       va_start(args, Fmt);
        Debug_Fmt(1, Fmt, args);
-       va_end(args);
        Debug_Puts(1, "\r\n");
        
        #if LOCK_DEBUG_OUTPUT
        SHORTREL(&glDebug_Lock);
        #endif
 }
+
+/**
+ * \fn void Log(const char *Msg, ...)
+ */
+void Log(const char *Fmt, ...)
+{
+       va_list args;
+       va_start(args, Fmt);
+       LogV(Fmt, args);
+       va_end(args);
+}
+
 void Warning(const char *Fmt, ...)
 {
        va_list args;
@@ -221,6 +241,7 @@ void Panic(const char *Fmt, ...)
        Debug_Putchar('\n');
 
        Threads_Dump();
+       Heap_Dump();
 
        for(;;) ;
 }
@@ -384,7 +405,7 @@ void Debug_Leave(const char *FuncName, char RetType, ...)
        #endif
 }
 
-void Debug_HexDump(const char *Header, const void *Data, Uint Length)
+void Debug_HexDump(const char *Header, const void *Data, size_t Length)
 {
        const Uint8     *cdat = Data;
        Uint    pos = 0;

UCC git Repository :: git.ucc.asn.au