Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
While troubleshooting why gdb wasn't working when attempting to debug
serenity programs I noticed two things:
- The contract of serenity's `waitpid(..)` appears to be slightly
different than the generic ptrace target expects. We need to make
sure we pass `WSTOPPED`, and it can return different errno values
that we would want to re-try on.
- The contract of serenity's `ptrace(..)` implementation appears to
diverge as well, as we are expected to call `PT_ATTACH` before we
call `PT_CONTINUE`, otherwise `ptrace(..)` will just error out.
These two patches fix the behavior of wait and mourn_inferior so that
they work as expected on serenity and allow us to attach and then wait
for a process to exit while running under gdb.
|
|
Before working on the gdb port some more, I wanted to get these patches
cleaned up to have a good base to build upon.
|
|
This patch adds a ptrace based gdb backend, which is then enlightended
to known how to read the serenity i386 registers via ptrace.
This is just a basic implementation to get the port bootstrapped.
|
|
These are compilation errors coming form upstream gdb.
|
|
Stack regions can't be made volatile, which makes it impossible for
malloc to manage memory that's used for `sigaltstack()`. Let's use mmap
instead.
Co-authored-by: Idan Horowitz <idan.horowitz@gmail.com>
|
|
This builds and runs, but crashes when you attempt to try to debug
something at the moment.
|