#[Solved] core:sys/linux ptrace_cont returning EIO every time

2 messages · Page 1 of 1 (latest)

runic obsidian
#

Hello!
I was playing with ptrace from core:sys/linux.
Any time I'm trying to execute ptrace_cont I'm getting EIO. So I attached strace and get something like this:

ptrace(PTRACE_CONT, 13337, NULL, 459103680) = -1 EIO (Input/output error)

So I started to look into source code and found in ptrace_cont

syscall(SYS_ptrace, rq, pid, sig)

But according to ptrace syscall documentation in this case Signal should go as a 4th parameter. And sure enough when I patched ptrace_cont and rebuild Odin like this:

syscall(SYS_ptrace, rq, pid, 0, sig)

I'm getting good result from strace

ptrace(PTRACE_CONT, 13836, NULL, 0) = 0

and process I'm trying to trace continued. I did a quick search on github for issues regarding ptrace and can't find anything open. So my question is am I using Odin's ptrace wrong? Or is it a bug and I should open an issue on github?

runic obsidian