Topic
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
Saitang
Saitang
2 Posts
ACCEPTED ANSWER

Pinned topic /proc control of a process and private text segments...help

‏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 libxxx.so linked to it containing function xxx(). If libxxx.so 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 libxxx.so to force the shared library to be loaded privately using 'chmod o-rx libxxx.so'. If libxxx.so 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 ?