X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_debug.c;h=ed98accfcd54256af1b260609e215bb82fb85f07;hp=35ef98dcdedce2956c1460679e252010da97dbf1;hb=5db3136d5331c355c188537c68005db8d2cb4eac;hpb=1aaebb897ea68da37b76519f74460808de7b92e6 diff --git a/palacios/src/palacios/vmm_debug.c b/palacios/src/palacios/vmm_debug.c index 35ef98d..ed98acc 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"); } }