On Linux we are fortunate to have /proc; and in it there is a subdirectory for every process with the name the same as the process ID of that process. In there are lots of useful things. The 'fd' directory is good for finding out where a program is upto (try it on a big cp -r !), or for seeing if your program opened the file you expected it to!
The 'maps' file shows you all the files which make up the running memory map of the program - it is very instructive, and is useful for seeing if a pointer address is sensible.