diff --git a/Kernel/CoreDump.cpp b/Kernel/CoreDump.cpp index 2dd4719488e..e8f3f6f5cd2 100644 --- a/Kernel/CoreDump.cpp +++ b/Kernel/CoreDump.cpp @@ -216,6 +216,7 @@ ByteBuffer CoreDump::create_notes_process_data() const ELF::Core::ProcessInfo info {}; info.header.type = ELF::Core::NotesEntryHeader::Type::ProcessInfo; info.pid = m_process->pid().value(); + info.termination_signal = m_process->termination_signal(); process_data.append((void*)&info, sizeof(info)); diff --git a/Kernel/Process.h b/Kernel/Process.h index 2f2945be308..df4f332899f 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -449,6 +449,8 @@ public: void terminate_due_to_signal(u8 signal); KResult send_signal(u8 signal, Process* sender); + u8 termination_signal() const { return m_termination_signal; } + u16 thread_count() const { return m_thread_count.load(AK::MemoryOrder::memory_order_relaxed); diff --git a/Libraries/LibELF/CoreDump.h b/Libraries/LibELF/CoreDump.h index e5b60abcd8e..49784303064 100644 --- a/Libraries/LibELF/CoreDump.h +++ b/Libraries/LibELF/CoreDump.h @@ -51,6 +51,7 @@ struct [[gnu::packed]] NotesEntry { struct [[gnu::packed]] ProcessInfo { NotesEntryHeader header; int pid; + u8 termination_signal; char executable_path[]; // Null terminated };