Kernel/vfs - Fixing OpenInode support
[tpg/acess2.git] / Kernel / debug.c
index 6e7a000..0ad7469 100644 (file)
@@ -12,7 +12,7 @@
 #define        LOCK_DEBUG_OUTPUT       1
 
 // === IMPORTS ===
-extern void Threads_Dump(void);
+extern void    Threads_Dump(void);
 extern void    KernelPanic_SetMode(void);
 extern void    KernelPanic_PutChar(char Ch);
 
@@ -250,7 +250,7 @@ void Debug_Enter(const char *FuncName, const char *ArgTypes, ...)
 
        va_start(args, ArgTypes);
 
-       LogF("%012lli ", now());
+       LogF("%014lli ", now());
        while(i--)      Debug_Putchar(' ');
 
        Debug_Puts(1, FuncName);
@@ -308,7 +308,7 @@ void Debug_Log(const char *FuncName, const char *Fmt, ...)
 
        va_start(args, Fmt);
 
-       LogF("%012lli ", now());
+       LogF("%014lli ", now());
        while(i--)      Debug_Putchar(' ');
 
        Debug_Puts(1, FuncName);
@@ -343,7 +343,7 @@ void Debug_Leave(const char *FuncName, char RetType, ...)
                gDebug_Level = 0;
                i = 0;
        }
-       LogF("%012lli ", now());
+       LogF("%014lli ", now());
        // Indenting
        while(i--)      Debug_Putchar(' ');
 
@@ -387,19 +387,22 @@ void Debug_HexDump(const char *Header, const void *Data, Uint Length)
 {
        const Uint8     *cdat = Data;
        Uint    pos = 0;
+       LogF("%014lli ", now());
        Debug_Puts(1, Header);
        LogF(" (Hexdump of %p)\r\n", Data);
 
-       #define CH(n)   ((' '<=cdat[(n)]&&cdat[(n)]<=0x7F) ? cdat[(n)] : '.')
+       #define CH(n)   ((' '<=cdat[(n)]&&cdat[(n)]<0x7F) ? cdat[(n)] : '.')
 
        while(Length >= 16)
        {
-               Log("%04x: %02x %02x %02x %02x %02x %02x %02x %02x"
+               LogF("%014lli Log: %04x:"
                        " %02x %02x %02x %02x %02x %02x %02x %02x"
-                       "  %c%c%c%c%c%c%c%c %c%c%c%c%c%c%c%c",
+                       " %02x %02x %02x %02x %02x %02x %02x %02x"
+                       "  %c%c%c%c%c%c%c%c %c%c%c%c%c%c%c%c\r\n",
+                       now(),
                        pos,
-                       cdat[0], cdat[1], cdat[2], cdat[3], cdat[4], cdat[5], cdat[6], cdat[7],
-                       cdat[8], cdat[9], cdat[10], cdat[11], cdat[12], cdat[13], cdat[14], cdat[15],
+                       cdat[ 0], cdat[ 1], cdat[ 2], cdat[ 3], cdat[ 4], cdat[ 5], cdat[ 6], cdat[ 7],
+                       cdat[ 8], cdat[ 9], cdat[10], cdat[11], cdat[12], cdat[13], cdat[14], cdat[15],
                        CH(0),  CH(1),  CH(2),  CH(3),  CH(4),  CH(5),  CH(6),  CH(7),
                        CH(8),  CH(9),  CH(10), CH(11), CH(12), CH(13), CH(14), CH(15)
                        );
@@ -410,7 +413,7 @@ void Debug_HexDump(const char *Header, const void *Data, Uint Length)
 
        {
                 int    i ;
-               LogF("Log: %04x: ", pos);
+               LogF("%014lli Log: %04x: ", now(), pos);
                for(i = 0; i < Length; i ++)
                {
                        LogF("%02x ", cdat[i]);
@@ -422,10 +425,10 @@ void Debug_HexDump(const char *Header, const void *Data, Uint Length)
                        if( i == 8 )    LogF(" ");
                        LogF("%c", CH(i));
                }
-       }
        
-       Debug_Putchar('\r');
-       Debug_Putchar('\n');
+               Debug_Putchar('\r');
+               Debug_Putchar('\n');
+       }
 }
 
 // --- EXPORTS ---

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