mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:47:45 +00:00
Kernel: Dump backtrace to debugger for DefaultSignalAction::DumpCore.
This makes assertion failures generate backtraces again. Sorry to everyone who suffered from the lack of backtraces lately. :^) We share code with the /proc/PID/stack implementation. You can now get the current backtrace for a Thread via Thread::backtrace(), and all the traces for a Process via Process::backtrace().
This commit is contained in:
parent
a599317624
commit
4316fa8123
5 changed files with 62 additions and 32 deletions
|
@ -16,6 +16,7 @@
|
|||
class Alarm;
|
||||
class FileDescription;
|
||||
class Process;
|
||||
class ProcessInspectionHandle;
|
||||
class Region;
|
||||
|
||||
enum class ShouldUnblockThread {
|
||||
|
@ -49,6 +50,8 @@ public:
|
|||
Process& process() { return m_process; }
|
||||
const Process& process() const { return m_process; }
|
||||
|
||||
String backtrace(ProcessInspectionHandle&) const;
|
||||
|
||||
void finalize();
|
||||
|
||||
enum State : u8 {
|
||||
|
@ -205,6 +208,7 @@ public:
|
|||
|
||||
u16 selector() const { return m_far_ptr.selector; }
|
||||
TSS32& tss() { return m_tss; }
|
||||
const TSS32& tss() const { return m_tss; }
|
||||
State state() const { return m_state; }
|
||||
const char* state_string() const;
|
||||
u32 ticks() const { return m_ticks; }
|
||||
|
@ -371,3 +375,7 @@ inline IterationDecision Thread::for_each_in_state(State state, Callback callbac
|
|||
return Scheduler::for_each_nonrunnable(new_callback);
|
||||
}
|
||||
|
||||
inline const LogStream& operator<<(const LogStream& stream, const Thread& value)
|
||||
{
|
||||
return stream << "Thread{" << &value << "}(" << value.pid() << ":" << value.tid() << ")";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue