0001-gdb-Disable-xmalloc-for-alternate_signal_stack-for-s.patchgdb: Disable xmalloc for alternate_signal_stack for minerva
0002-minerva-Add-basic-ptrace-based-native-target-for-Se.patchminerva: Add basic ptrace based native target for Minerva/i386
0003-gdb-Add-build-support-for-Minerva.patchgdb: Add build support for Minerva
0004-minerva-Fix-compiler-fpermissive-warnings-from-usin.patchminerva: Fix compiler -fpermissive warnings from using latest GCC
0005-minerva-Implement-custom-wait-override-for-the-sere.patchminerva: Implement custom wait override for the minerva_nat_target
While troubleshooting why gdb wasn't working when attempting to debug minerva programs I noticed two things:
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.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.Allow gdb to understand these differences, I've overloaded the minerva_nat_target::wait(..) method and added the logic there.
0006-minerva-Implement-mourn_inferior-override-for-the-s.patchminerva: Implement mourn_inferior override for the minerva_nat_target
We need to pass WNOHANG to our waitpid(..) call on Minerva, otherwise we will wait forever.