mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: add cpu segment note for coredump
The crash tool use a special note segment which named 'QEMU' to analyze kaslr info and so on. If we don't add the 'QEMU' note segment, crash tool can't find linux version to move on. For now, the most convenient way is to add 'QEMU' note segment to make crash tool happy. Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
This commit is contained in:
@@ -17,11 +17,9 @@ use crate::config::{
|
||||
UserDeviceConfig, ValidationError, VdpaConfig, VmConfig, VsockConfig,
|
||||
};
|
||||
#[cfg(feature = "guest_debug")]
|
||||
use crate::coredump::DumpState;
|
||||
#[cfg(feature = "guest_debug")]
|
||||
use crate::coredump::{Elf64Writable, NoteDescType};
|
||||
#[cfg(feature = "guest_debug")]
|
||||
use crate::coredump::{GuestDebuggable, GuestDebuggableError};
|
||||
use crate::coredump::{
|
||||
CpuElf64Writable, DumpState, Elf64Writable, GuestDebuggable, GuestDebuggableError, NoteDescType,
|
||||
};
|
||||
use crate::cpu;
|
||||
use crate::device_manager::{Console, DeviceManager, DeviceManagerError, PtyPair};
|
||||
use crate::device_tree::DeviceTree;
|
||||
@@ -3052,6 +3050,15 @@ impl GuestDebuggable for Vm {
|
||||
self.write_note(&coredump_state)?;
|
||||
self.write_loads(&coredump_state)?;
|
||||
|
||||
self.cpu_manager
|
||||
.lock()
|
||||
.unwrap()
|
||||
.cpu_write_elf64_note(&coredump_state)?;
|
||||
self.cpu_manager
|
||||
.lock()
|
||||
.unwrap()
|
||||
.cpu_write_vmm_note(&coredump_state)?;
|
||||
|
||||
self.memory_manager
|
||||
.lock()
|
||||
.unwrap()
|
||||
|
||||
Reference in New Issue
Block a user