IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
2 Posts

Pinned topic /proc control of a process and private text

‏2011-04-27T13:35:31Z |
I have a 64bit process using the /proc filesystem to control a 64bit target process. The target process has a shared library called linked to it containing function xxx(). If is loaded in 'shared library text' space then my controlling process can write a break instruction at the address of function xxx() to the /proc/<pid>/as file. That puts a breakpoint in function xxx() which I'll hit when I continue the target process.

However, I can modify the permissions on to force the shared library to be loaded privately using 'chmod o-rx'. If is loaded in 'private load text', then the write of the breakpoint to the /proc/<pid>/as file fails with EIO.

Why does the write to the address space in the privately loaded shared library fail ? Is there a way around this or do I need to use hardware breakpoint registers ?