X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fdebug.c;h=a378ae817b881564da8b48835683bc08be4c159e;hb=5393d8b418bbfe48509ef3f40070175bca9bf71a;hp=c9a29647c1c5da82b700cb194089a661930e6961;hpb=d0ab557dc2626075d0ee0a2d25be74f51249b842;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/debug.c b/KernelLand/Kernel/debug.c index c9a29647..a378ae81 100644 --- a/KernelLand/Kernel/debug.c +++ b/KernelLand/Kernel/debug.c @@ -7,7 +7,7 @@ #define DEBUG_MAX_LINE_LEN 256 #define LOCK_DEBUG_OUTPUT 1 // Avoid interleaving of output lines? -#define TRACE_TO_KTERM 0 // Send ENTER/DEBUG/LEAVE to debug? +#define TRACE_TO_KTERM 1 // Send ENTER/DEBUG/LEAVE to debug? // === IMPORTS === extern void Threads_Dump(void); @@ -94,12 +94,13 @@ void Debug_DbgOnlyFmt(const char *format, va_list args) void Debug_Fmt(int bUseKTerm, const char *format, va_list args) { char buf[DEBUG_MAX_LINE_LEN]; -// int len; buf[DEBUG_MAX_LINE_LEN-1] = 0; - /*len = */vsnprintf(buf, DEBUG_MAX_LINE_LEN-1, format, args); - //if( len < DEBUG_MAX_LINE ) - // do something + int len = vsnprintf(buf, DEBUG_MAX_LINE_LEN-1, format, args); Debug_Puts(bUseKTerm, buf); + if( len > DEBUG_MAX_LINE_LEN-1 ) { + // do something + Debug_Puts(bUseKTerm, "[...]"); + } return ; } @@ -250,8 +251,8 @@ void Panic(const char *Fmt, ...) Debug_Putchar('\r'); Debug_Putchar('\n'); - Threads_Dump(); - Heap_Dump(); + //Threads_Dump(); + //Heap_Dump(); for(;;) ; }