1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 17:45:07 +00:00

ptrace: Add PT_SETREGS

PT_SETTREGS sets the regsiters of the traced thread. It can only be
used when the tracee is stopped.

Also, refactor ptrace.
The implementation was getting long and cluttered the alraedy large
Process.cpp file.

This commit moves the bulk of the implementation to Kernel/Ptrace.cpp,
and factors out peek & poke to separate methods of the Process class.
This commit is contained in:
Itamar 2020-04-07 18:23:37 +03:00 committed by Andreas Kling
parent 0431712660
commit 9e51e295cf
11 changed files with 299 additions and 157 deletions

View file

@ -944,4 +944,10 @@ void Thread::tracer_trap(const RegisterState& regs)
send_urgent_signal_to_self(SIGTRAP);
}
const Thread::Blocker& Thread::blocker() const
{
ASSERT(m_blocker);
return *m_blocker;
}
}