-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS support #99
Comments
Seconding this. Would like support and wondering the LoE on doing this, seems like the Makefile could be adjusted to check and support the right gcc or am I missing something? |
@jamesacampbell Unfortunately it's a bit more involved than that- reptyr gets pretty deep into kernel debugging facilities that vary, usually quite wildly, from kernel-to-kernel. In the Mac OS case, they seem to have a very limited form of ptrace(2) inherited from *BSD, but it contains almost none of the necessary functionality to be useful. You're looking at writing platform shims that look like ptrace to reptyr (because that part is abstracted away in platform/ glue) but use whatever facility MacOS provides at a minimum. =( |
@kevans91 thanks for that, I definitely was missing that context. That seems like a heavy lift. |
The macOS ptrace calls seem to work well enough for the macOS port of GDB; what does reptyr need to do with ptrace that gdb doesn't? |
As far as I know, gdb's not typically executing syscalls in the victim context as we need to in reptyr. For some specific points, I don't really see any equivalent to PT_{GET,SET}REGS (which we'll use to replace syscall arguments and rewind to the original syscall instruction in conjunction with PT_TO_SCE/PT_TO_SCX to advance to the next syscall and then break when we execute it). I don't recall any specifics beyond that, I haven't really looked at this much in the intervening five years since the message you uoted. |
Since #83 (just titled "Mac") was closed via fe7a276, it's apparent that that issue was about failing with a better error message. Since it looks like there's no other issue tracking Mac support, I figured I'd create this one.
Thanks for releasing reptyr!
The text was updated successfully, but these errors were encountered: