mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 10:01:13 +09:00
Kernel: Generate a coredump file when a process crashes
When a process crashes, we generate a coredump file and write it in /tmp/coredumps/. The coredump file is an ELF file of type ET_CORE. It contains a segment for every userspace memory region of the process, and an additional PT_NOTE segment that contains the registers state for each thread, and a additional data about memory regions (e.g their name).
This commit is contained in:
parent
efe4da57df
commit
b4842d33bb
Notes:
sideshowbarker
2024-07-19 00:51:16 +09:00
Author: https://github.com/itamar8910
Commit: b4842d33bb
Pull-request: https://github.com/SerenityOS/serenity/pull/3738
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/awesomekling
11 changed files with 427 additions and 1 deletions
|
@ -144,6 +144,9 @@ NEVER_INLINE static void dump_backtrace_impl(FlatPtr base_pointer, bool use_ksym
|
|||
if (use_ksyms) {
|
||||
FlatPtr copied_stack_ptr[2];
|
||||
for (FlatPtr* stack_ptr = (FlatPtr*)base_pointer; stack_ptr && recognized_symbol_count < max_recognized_symbol_count; stack_ptr = (FlatPtr*)copied_stack_ptr[0]) {
|
||||
if ((FlatPtr)stack_ptr < 0xc0000000)
|
||||
break;
|
||||
|
||||
void* fault_at;
|
||||
if (!safe_memcpy(copied_stack_ptr, stack_ptr, sizeof(copied_stack_ptr), fault_at))
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue