Commit 9746b15b4ecd4702410a2769f6d18a67dbd0872d
1 parent
7372f88d
'info mem' monitor command fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1134 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
5 additions
and
3 deletions
monitor.c
@@ -764,13 +764,15 @@ static void tlb_info(void) | @@ -764,13 +764,15 @@ static void tlb_info(void) | ||
764 | static void mem_print(uint32_t *pstart, int *plast_prot, | 764 | static void mem_print(uint32_t *pstart, int *plast_prot, |
765 | uint32_t end, int prot) | 765 | uint32_t end, int prot) |
766 | { | 766 | { |
767 | - if (prot != *plast_prot) { | 767 | + int prot1; |
768 | + prot1 = *plast_prot; | ||
769 | + if (prot != prot1) { | ||
768 | if (*pstart != -1) { | 770 | if (*pstart != -1) { |
769 | term_printf("%08x-%08x %08x %c%c%c\n", | 771 | term_printf("%08x-%08x %08x %c%c%c\n", |
770 | *pstart, end, end - *pstart, | 772 | *pstart, end, end - *pstart, |
771 | - prot & PG_USER_MASK ? 'u' : '-', | 773 | + prot1 & PG_USER_MASK ? 'u' : '-', |
772 | 'r', | 774 | 'r', |
773 | - prot & PG_RW_MASK ? 'w' : '-'); | 775 | + prot1 & PG_RW_MASK ? 'w' : '-'); |
774 | } | 776 | } |
775 | if (prot != 0) | 777 | if (prot != 0) |
776 | *pstart = end; | 778 | *pstart = end; |