mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:57:42 +00:00
Kernel: Store coredump metadata properties as KStrings
This patch also replaces the HashMap previously used to store coredump properties with a plain AK::Array.
This commit is contained in:
parent
95669fa861
commit
33adc3a42d
6 changed files with 55 additions and 24 deletions
|
@ -382,14 +382,14 @@ void page_fault_handler(TrapFrame* trap)
|
|||
if (current_thread) {
|
||||
auto& current_process = current_thread->process();
|
||||
if (current_process.is_user_process()) {
|
||||
current_process.set_coredump_metadata("fault_address", String::formatted("{:p}", fault_address));
|
||||
current_process.set_coredump_metadata("fault_type", fault.type() == PageFault::Type::PageNotPresent ? "NotPresent" : "ProtectionViolation");
|
||||
(void)current_process.try_set_coredump_property("fault_address", String::formatted("{:p}", fault_address));
|
||||
(void)current_process.try_set_coredump_property("fault_type", fault.type() == PageFault::Type::PageNotPresent ? "NotPresent" : "ProtectionViolation");
|
||||
String fault_access;
|
||||
if (fault.is_instruction_fetch())
|
||||
fault_access = "Execute";
|
||||
else
|
||||
fault_access = fault.access() == PageFault::Access::Read ? "Read" : "Write";
|
||||
current_process.set_coredump_metadata("fault_access", fault_access);
|
||||
(void)current_process.try_set_coredump_property("fault_access", fault_access);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue