]> git.proxmox.com Git - qemu.git/commitdiff
'info mem' monitor command fix
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 11 Nov 2004 18:30:24 +0000 (18:30 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 11 Nov 2004 18:30:24 +0000 (18:30 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1134 c046a42c-6fe2-441c-8c8c-71466251a162

monitor.c

index ee19128458a433e5cbca19c34b971221e13a3003..bb212463103a90615ab97eb7d6671d1a054c2365 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -764,13 +764,15 @@ static void tlb_info(void)
 static void mem_print(uint32_t *pstart, int *plast_prot, 
                       uint32_t end, int prot)
 {
-    if (prot != *plast_prot) {
+    int prot1;
+    prot1 = *plast_prot;
+    if (prot != prot1) {
         if (*pstart != -1) {
             term_printf("%08x-%08x %08x %c%c%c\n",
                         *pstart, end, end - *pstart, 
-                        prot & PG_USER_MASK ? 'u' : '-',
+                        prot1 & PG_USER_MASK ? 'u' : '-',
                         'r',
-                        prot & PG_RW_MASK ? 'w' : '-');
+                        prot1 & PG_RW_MASK ? 'w' : '-');
         }
         if (prot != 0)
             *pstart = end;