I'm trying to read a child process's stack but with no luck.
I know it is possible using
ptrace's interface allows you to read only one word at a time, and I'm trying to scan a larger portions of the stack.
I've also tried reading the
/proc/$pid/mem from the boundries of the stack as extracted from the
/proc/$pid/maps file after first using ptrace to attach to it
(as suggested here) but the read keeps failing (even when running as root) although the same code succeeds when tried reading from different parts of the process (e.g. heap).
What am I doing wrong? Is there any other option?