Reading /proc/<pid>/mem
I'm having some problems with reading /proc/<pid>/mem :(
What I'm doing is the following: 1. attach to another process using ptrace (it's paused automatically doing this) 2. read that processes' memory map (/proc/<pid>/maps) 3. do a pread() on each "segment" in the map I've verified that the ptrace attaching works, the process is paused as expected. The problem is reading the data, and I have two problems:
Any suggestions? |
lseek [Was: /proc/<pid>/mem]
Quote:
Hmmm, am I missing something here? |
Quote:
Following the lseek64(3) man page I stuck the following at the top of the source to turn on 64 bit file offsets: Code:
#define _FILE_OFFSET_BITS 64 Code:
#define _XOPEN_SOURCE 500 |
All times are GMT -5. The time now is 02:32 AM. |