Ok, so as a rehash, the ptrace & open(),lseek() on /proc/*/mem should
both work about the same. After a lot of struggling, I've gotten the
ptrace to work right & spit out the data I want/need. However there is
one small problem, SIGSTOP.
ptrace() appears to set up the child process to do a SIGSTOP whenever
any interrupt is received. Which is kind of a bad thing for what I'm
looking to do. I guess I'm trying to write a non-intrusive debugger
that can be used to view static variables stored in the heap of an
application.
On other OS's, this can be done just by popping open /proc/*/mem, and
reading the data as needed, allowing the child process to continue
processing away as if nothing is going on. I'm looking to do the same
sort of task under Linux.
Unfortunately, ptrace() probobally isn't going to allow me to do that.
So my next question is does opening /proc/*/mem force the child process
to stop on every interrupt (just like ptrace?)