提交 4058fd98 编写于 作者: J Jan Kiszka 提交者: Aurelien Jarno

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: NJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 5569fd7c
...@@ -175,12 +175,12 @@ cpu_x86_dump_seg_cache(CPUState *env, FILE *f, fprintf_function cpu_fprintf, ...@@ -175,12 +175,12 @@ cpu_x86_dump_seg_cache(CPUState *env, FILE *f, fprintf_function cpu_fprintf,
#ifdef TARGET_X86_64 #ifdef TARGET_X86_64
if (env->hflags & HF_CS64_MASK) { if (env->hflags & HF_CS64_MASK) {
cpu_fprintf(f, "%-3s=%04x %016" PRIx64 " %08x %08x", name, 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 } else
#endif #endif
{ {
cpu_fprintf(f, "%-3s=%04x %08x %08x %08x", name, sc->selector, 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)) if (!(env->hflags & HF_PE_MASK) || !(sc->flags & DESC_P_MASK))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册