Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


updated to 64 bits based on the wrong f#@$%ing trunk
[palacios.git] / palacios / src / palacios / vmm_debug.c
index 35ef98d..ed98acc 100644 (file)
 #include <palacios/vmm.h>
 
 
-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<n;i+=16) {
-    PrintDebug("%8x", (unsigned)(start+i));
-    for (j=i; j<i+16 && j<n; j+=2) {
+  for (i = 0; i < n; i += 16) {
+    PrintDebug("%8x", (start + i));
+
+    for (j = i; (j < (i + 16)) && (j < n); j += 2) {
       PrintDebug(" ");
-      PrintDebugHex(*((unsigned char *)(start+j)));
-      if ((j+1)<n) { 
-       PrintDebugHex(*((unsigned char *)(start+j+1)));
+      PrintDebugHex(*((uchar_t *)(start + j)));
+
+      if ((j + 1) < n) { 
+       PrintDebugHex(*((uchar_t *)(start + j + 1)));
       }
+
     }
+
     PrintDebug(" ");
-    for (j=i; j<i+16 && j<n;j++) {
-      PrintDebug("%c", ((start[j]>=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");
   }
 }