Red Hat Bugzilla – Bug 1292563
[LLNL 7.5 FEAT] Provide API to access all link maps, including those from dlmopen (gdb)
Last modified: 2017-10-18 15:53:38 EDT
This work includes not only changes to glibc but also changes to gdb to make use of this new function and make it available to gdb users.
Another thing at least tangentially associated with this RFE that came up in the last meeting which included Carlos and a few people from LLNL is that they also need first party access to these things. They said that one of our weaknesses is all of our tools interfaces seem to be designed to be 3rd party. So a debugger like GDB can remotely access an app's variables link map and its DWARF (3rd party is external) but embedded instrumentation and tools that are inserted into the processes address space with something like dyninst (1st party) don't have similar functions.
So when you are working on a tools application keep 1st party tooling in mind. For this case, having a tool interface which allows us to find all the link maps and be notified when things change would be good.
If Infinity + glibc is going to be the solution, how do we:
1) find the Infinity ELF notes from inside the application
2) Execute the DWARF expression to find the head of the link maps and iterate through them.
3) Trigger off of events in the dynamic linker when we inside the context of the process so that we can notice changes in the link map.
Alternatively if Infinity is only a 3rd party solution we should have a supported 1st party tools interface for the dynamic linker. Dyninst and by extension userspace systemtap can already find and trigger off of SDT markers. If there were functions in the dynamic linker which provided functions equivalent to libthread.db that allowed us to iterate through the link maps then we'd probably have the 1st party debugger thing covered.
LLNL requests that this bug be made public. They have collaborators at other organizations around the world that are also needing this functionality and they are collaborating on exascale tools. They want this open.
I have reviewed the comments so far and feel that there is nothing confidential in there.