mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel+LibELF: Store termination signal in coredump ProcessInfo
This commit is contained in:
parent
b5437216e2
commit
0571a17f57
Notes:
sideshowbarker
2024-07-19 00:08:17 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/0571a17f57e Pull-request: https://github.com/SerenityOS/serenity/pull/4780
3 changed files with 4 additions and 0 deletions
|
@ -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));
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -51,6 +51,7 @@ struct [[gnu::packed]] NotesEntry {
|
|||
struct [[gnu::packed]] ProcessInfo {
|
||||
NotesEntryHeader header;
|
||||
int pid;
|
||||
u8 termination_signal;
|
||||
char executable_path[]; // Null terminated
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue