1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:18:12 +00:00

Kernel: Generate coredump backtraces from "threads for coredump" list

This broke with the change that gave each process a list of its own
threads. Since threads are removed slightly earlier from that list
during process teardown, we're not able to use it for generating
coredump backtraces. Fortunately we have the "threads for coredump"
list for just this purpose. :^)
This commit is contained in:
Andreas Kling 2021-01-28 08:41:18 +01:00
parent b72f067f0d
commit 5ff355c0cd
4 changed files with 10 additions and 6 deletions

View file

@ -240,7 +240,7 @@ ByteBuffer CoreDump::create_notes_threads_data() const
{
ByteBuffer threads_data;
m_process->for_each_thread([&](Thread& thread) {
for (auto& thread : m_process->threads_for_coredump({})) {
ByteBuffer entry_buff;
ELF::Core::ThreadInfo info {};
@ -251,9 +251,7 @@ ByteBuffer CoreDump::create_notes_threads_data() const
entry_buff.append((void*)&info, sizeof(info));
threads_data += entry_buff;
return IterationDecision::Continue;
});
}
return threads_data;
}