x86: Filter out garbage from segment flags dump
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 27 Dec 2010 14:52:24 +0000 (15:52 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Mon, 27 Dec 2010 21:02:52 +0000 (22:02 +0100)
Only bits 8..23 of the segment flags contain valid data, so only dump
those when printing the CPU state.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-i386/helper.c

index 26ea1e58e08fb580f52a1f0b6516673b11aea2d1..25a3e36138c4c29c92800daafb84d5ee7bd33161 100644 (file)
@@ -175,12 +175,12 @@ cpu_x86_dump_seg_cache(CPUState *env, FILE *f, fprintf_function cpu_fprintf,
 #ifdef TARGET_X86_64
     if (env->hflags & HF_CS64_MASK) {
         cpu_fprintf(f, "%-3s=%04x %016" PRIx64 " %08x %08x", name,
-                    sc->selector, sc->base, sc->limit, sc->flags);
+                    sc->selector, sc->base, sc->limit, sc->flags & 0x00ffff00);
     } else
 #endif
     {
         cpu_fprintf(f, "%-3s=%04x %08x %08x %08x", name, sc->selector,
-                    (uint32_t)sc->base, sc->limit, sc->flags);
+                    (uint32_t)sc->base, sc->limit, sc->flags & 0x00ffff00);
     }
 
     if (!(env->hflags & HF_PE_MASK) || !(sc->flags & DESC_P_MASK))