diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-28 08:41:18 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-28 08:41:18 +0100 |
commit | 5ff355c0cdf48796bc16335e1af7f34c41dcf576 (patch) | |
tree | 995867bab502755061db1cedd1f8e771390a540b /Kernel/CoreDump.cpp | |
parent | b72f067f0daac88ebe66e3f714e517b995b48e7b (diff) | |
download | serenity-5ff355c0cdf48796bc16335e1af7f34c41dcf576.zip |
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. :^)
Diffstat (limited to 'Kernel/CoreDump.cpp')
-rw-r--r-- | Kernel/CoreDump.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Kernel/CoreDump.cpp b/Kernel/CoreDump.cpp index b03f27da82..2f3007e863 100644 --- a/Kernel/CoreDump.cpp +++ b/Kernel/CoreDump.cpp @@ -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; } |