Implement acct and pretend to implement madvise.
[qemu] / monitor.c
index 6b98cf1..3c0fd91 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -356,7 +356,7 @@ static void do_change(const char *device, const char *filename)
 
 static void do_screen_dump(const char *filename)
 {
-    vga_screen_dump(filename);
+    vga_hw_screen_dump(filename);
 }
 
 static void do_log(const char *items)
@@ -457,10 +457,18 @@ static void memory_dump(int count, int format, int wsize,
         } else if (wsize == 4) {
             flags = 0;
         } else {
-                /* as default we use the current CS size */
+            /* as default we use the current CS size */
             flags = 0;
-            if (env && !(env->segs[R_CS].flags & DESC_B_MASK))
-                flags = 1;
+            if (env) {
+#ifdef TARGET_X86_64
+                if ((env->efer & MSR_EFER_LMA) && 
+                    (env->segs[R_CS].flags & DESC_L_MASK))
+                    flags = 2;
+                else
+#endif
+                if (!(env->segs[R_CS].flags & DESC_B_MASK))
+                    flags = 1;
+            }
         }
 #endif
         monitor_disas(env, addr, count, is_physical, flags);
@@ -1549,6 +1557,7 @@ static target_long expr_unary(void)
         n = 0;
         break;
     default:
+        /* XXX: 64 bit version */
         n = strtoul(pch, &p, 0);
         if (pch == p) {
             expr_error("invalid char in expression");