From: Jan Kiszka Date: Mon, 27 Dec 2010 14:52:24 +0000 (+0100) Subject: x86: Filter out garbage from segment flags dump X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~6794 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4058fd98fd7e9c476774717adbd49698dd273166;p=sdk%2Femulator%2Fqemu.git x86: Filter out garbage from segment flags dump 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 Signed-off-by: Aurelien Jarno --- diff --git a/target-i386/helper.c b/target-i386/helper.c index 26ea1e5..25a3e36 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -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))