@@ -26,9 +26,18 @@ use super::Hypervisor;
2626use crate :: mem:: memory_region:: { MemoryRegion , MemoryRegionFlags } ;
2727use crate :: { new_error, Result } ;
2828
29+ /// This constant is used to identify the XSAVE state in the core dump
2930const NT_X86_XSTATE : u32 = 0x202 ;
31+ /// This constant identifies the entry point of the program in an Auxiliary Vector
32+ /// note of ELF. This tells a debugger whether the entry point of the program changed
33+ /// so it can load the symbols correctly.
3034const AT_ENTRY : u64 = 9 ;
35+ /// This constant is used to mark the end of the Auxiliary Vector note
3136const AT_NULL : u64 = 0 ;
37+ /// The PID of the core dump process - this is a placeholder value
38+ const CORE_DUMP_PID : i32 = 1 ;
39+ /// The page size of the core dump
40+ const CORE_DUMP_PAGE_SIZE : usize = 0x1000 ;
3241
3342/// Structure to hold the crash dump context
3443/// This structure contains the information needed to create a core dump
@@ -152,13 +161,13 @@ impl GuestView {
152161
153162impl ProcessInfoSource for GuestView {
154163 fn pid ( & self ) -> i32 {
155- 1
164+ CORE_DUMP_PID
156165 }
157166 fn threads ( & self ) -> & [ elfcore:: ThreadView ] {
158167 & self . threads
159168 }
160169 fn page_size ( & self ) -> usize {
161- 0x1000
170+ CORE_DUMP_PAGE_SIZE
162171 }
163172 fn aux_vector ( & self ) -> Option < & [ elfcore:: Elf64_Auxv ] > {
164173 Some ( & self . aux_vector )
@@ -167,6 +176,7 @@ impl ProcessInfoSource for GuestView {
167176 & self . regions
168177 }
169178 fn mapped_files ( & self ) -> Option < & [ elfcore:: MappedFile ] > {
179+ // We don't have mapped files
170180 None
171181 }
172182}
0 commit comments