Overhaul kdump().
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 12 Aug 2010 15:02:43 +0000 (15:02 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 12 Aug 2010 15:02:43 +0000 (15:02 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4174 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/drv/kdebug.c

index cb04f70b40bc3193a5398a1e3df6b80c8800d821..9c210343bc149f03235032d68ff3dc90d7a80aa7 100644 (file)
@@ -274,8 +274,14 @@ void kdump(const void *_buf, size_t len)
 {
        const unsigned char *buf = (const unsigned char *)_buf;
 
+       kprintf("Dumping buffer at addr [%p], %z bytes", buf, len);
+       size_t i=0;
        while (len--)
-               kprintf("%02X", *buf++);
+       {
+               if ((i % 16) == 0)
+                       kputs("\n");
+               kprintf("%02X ", *buf++);
+       }
        kputchar('\n');
 }