mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
Kernel: By default, don't dump regions when a userspace crash happens
There is the DUMP_REGIONS_ON_CRASH debug macro which re-enables this (old) behavior.
This commit is contained in:
parent
416fa7bd4f
commit
1a7d6508e3
3 changed files with 8 additions and 1 deletions
|
@ -55,6 +55,10 @@
|
||||||
#cmakedefine01 CONTIGUOUS_VMOBJECT_DEBUG
|
#cmakedefine01 CONTIGUOUS_VMOBJECT_DEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef DUMP_REGIONS_ON_CRASH
|
||||||
|
#cmakedefine01 DUMP_REGIONS_ON_CRASH
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef E1000_DEBUG
|
#ifndef E1000_DEBUG
|
||||||
#cmakedefine01 E1000_DEBUG
|
#cmakedefine01 E1000_DEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -412,7 +412,9 @@ void Process::crash(int signal, FlatPtr ip, bool out_of_memory)
|
||||||
protected_data.termination_signal = signal;
|
protected_data.termination_signal = signal;
|
||||||
});
|
});
|
||||||
set_should_generate_coredump(!out_of_memory);
|
set_should_generate_coredump(!out_of_memory);
|
||||||
address_space().with([](auto& space) { space->dump_regions(); });
|
if constexpr (DUMP_REGIONS_ON_CRASH) {
|
||||||
|
address_space().with([](auto& space) { space->dump_regions(); });
|
||||||
|
}
|
||||||
VERIFY(is_user_process());
|
VERIFY(is_user_process());
|
||||||
die();
|
die();
|
||||||
// We can not return from here, as there is nowhere
|
// We can not return from here, as there is nowhere
|
||||||
|
|
|
@ -36,6 +36,7 @@ set(DIFF_DEBUG ON)
|
||||||
set(DISASM_DUMP_DEBUG ON)
|
set(DISASM_DUMP_DEBUG ON)
|
||||||
set(DOUBLECLICK_DEBUG ON)
|
set(DOUBLECLICK_DEBUG ON)
|
||||||
set(DRAG_DEBUG ON)
|
set(DRAG_DEBUG ON)
|
||||||
|
set(DUMP_REGIONS_ON_CRASH ON)
|
||||||
set(DWARF_DEBUG ON)
|
set(DWARF_DEBUG ON)
|
||||||
set(DYNAMIC_LOAD_DEBUG ON)
|
set(DYNAMIC_LOAD_DEBUG ON)
|
||||||
set(E1000_DEBUG ON)
|
set(E1000_DEBUG ON)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue