Fix for the "help [-D|-n]" option on 32-bit X86 kernels that use the

64-bit ELF vmcore format generated by "virsh dump --memory-only".
Without the patch, the QEMUCPUState structures in QEMU notes are not
translated.
(qiaonuohan@cn.fujitsu.com)
This commit is contained in:
Dave Anderson 2015-01-05 13:51:32 -05:00
parent da66825399
commit 6dd0c32cbe

View File

@ -2271,10 +2271,14 @@ dump_Elf64_Nhdr(Elf64_Off offset, int store)
}
}
if (BITS32() && (xen_core || (note->n_type == NT_PRSTATUS))) {
if (BITS32() && (xen_core || (note->n_type == NT_PRSTATUS) || qemuinfo)) {
if (nd->ofp && !XEN_CORE_DUMPFILE() && !(pc->flags2 & LIVE_DUMP)) {
if (machine_type("X86") && (note->n_type == NT_PRSTATUS))
display_ELF_note(EM_386, PRSTATUS_NOTE, note, nd->ofp);
if (machine_type("X86")) {
if (note->n_type == NT_PRSTATUS)
display_ELF_note(EM_386, PRSTATUS_NOTE, note, nd->ofp);
else if (qemuinfo)
display_ELF_note(EM_386, QEMU_NOTE, note, nd->ofp);
}
}
iptr = (int *)uptr;