1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:07:36 +00:00

LibCoreDump+Crash{Daemon,Reporter}: Make backtraces thread-specific

We want to show an individual backtrace for each thread, not one
containing backtrace entries from all threads.

Fixes #4778.
This commit is contained in:
Linus Groh 2021-01-15 20:46:59 +01:00 committed by Andreas Kling
parent 057ae36e32
commit 7668e968af
6 changed files with 86 additions and 46 deletions

View file

@ -29,6 +29,7 @@
#include <AK/Types.h>
#include <LibCoreDump/Reader.h>
#include <LibDebug/DebugInfo.h>
#include <LibELF/CoreDump.h>
namespace CoreDump {
@ -54,14 +55,16 @@ public:
String to_string(bool color = false) const;
};
Backtrace(const Reader&);
Backtrace(const Reader&, const ELF::Core::ThreadInfo&);
~Backtrace();
const ELF::Core::ThreadInfo thread_info() const { return m_thread_info; }
const Vector<Entry> entries() const { return m_entries; }
private:
void add_backtrace_entry(const Reader&, FlatPtr eip);
void add_entry(const Reader&, FlatPtr eip);
ELF::Core::ThreadInfo m_thread_info;
Vector<Entry> m_entries;
};