X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_debug.c;h=9865dd1e704e783bf6263e4f2d92c625e11ff6e8;hb=ddd9b6c1a6d0051ba8eae32d25492145c8ca5995;hp=35ef98dcdedce2956c1460679e252010da97dbf1;hpb=e70e95962c26832628d586e07f9cd1a2e1852d72;p=palacios.git diff --git a/palacios/src/palacios/vmm_debug.c b/palacios/src/palacios/vmm_debug.c index 35ef98d..9865dd1 100644 --- a/palacios/src/palacios/vmm_debug.c +++ b/palacios/src/palacios/vmm_debug.c @@ -21,33 +21,39 @@ #include -void PrintDebugHex(unsigned char x) +void PrintDebugHex(uchar_t x) { unsigned char z; - z = (x>>4) & 0xf ; + z = (x >> 4) & 0xf ; PrintDebug("%x", z); z = x & 0xf; PrintDebug("%x", z); } -void PrintDebugMemDump(unsigned char *start, int n) +void PrintDebugMemDump(uchar_t *start, int n) { int i, j; - for (i=0;i=32) && (start[j]<=126)) ? start[j] : '.'); + + for (j = i; (j < (i + 16)) && (j < n); j++) { + PrintDebug("%c", ((start[j] >= 32) && (start[j] <= 126)) ? start[j] : '.'); } + PrintDebug("\n"); } }