mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
Kernel/SMP: Skip thread registers in core dump if there is no trap frame
We can only get thread registers if there's a trap frame.
This commit is contained in:
parent
9babb92a4b
commit
364134ad4b
Notes:
sideshowbarker
2024-07-18 07:10:15 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/364134ad4b3
|
@ -242,7 +242,9 @@ ByteBuffer CoreDump::create_notes_threads_data() const
|
||||||
ELF::Core::ThreadInfo info {};
|
ELF::Core::ThreadInfo info {};
|
||||||
info.header.type = ELF::Core::NotesEntryHeader::Type::ThreadInfo;
|
info.header.type = ELF::Core::NotesEntryHeader::Type::ThreadInfo;
|
||||||
info.tid = thread.tid().value();
|
info.tid = thread.tid().value();
|
||||||
copy_kernel_registers_into_ptrace_registers(info.regs, thread.get_register_dump_from_stack());
|
|
||||||
|
if (thread.current_trap())
|
||||||
|
copy_kernel_registers_into_ptrace_registers(info.regs, thread.get_register_dump_from_stack());
|
||||||
|
|
||||||
entry_buff.append((void*)&info, sizeof(info));
|
entry_buff.append((void*)&info, sizeof(info));
|
||||||
|
|
||||||
|
|
|
@ -1147,6 +1147,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
TrapFrame*& current_trap() { return m_current_trap; }
|
TrapFrame*& current_trap() { return m_current_trap; }
|
||||||
|
TrapFrame const* const& current_trap() const { return m_current_trap; }
|
||||||
|
|
||||||
RecursiveSpinLock& get_lock() const { return m_lock; }
|
RecursiveSpinLock& get_lock() const { return m_lock; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue