Re: [RFC] Removing in process agent (IPA)
Luis Machado <[email protected]>
| Newsgroups | gmane.comp.gdb.patches,gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 6/13/24 15:17, Andrew Burgess via Gdb wrote: > > Hi, > > I'd like to have a conversation about whether or not we want to keep the > in-process-agent (IPA or libinproctrace.so). > > A couple of recent patches[1][2] have triggered the question of whether > it would be better if we just dropped IPA from GDB. > > We do have some tests that make use of IPA in gdb.trace/, so its no > untested code. > > I'd describe myself as neutral on this topic. I've never used the IPA > myself, but I have no real objections to it continuing to live on. > However, if nobody wants to keep it I'm happy to do to the work to > remove it from GDB. > > So my question to the group: would anyone like to speak in favour of > keeping the IPA around? > > Thanks, > Andrew > > [1] https://inbox.sourceware.org/gdb-patches/[email protected] > [2] https://inbox.sourceware.org/gdb-patches/f18d8f32e1e8af423e38efd0cb58ced1a98b5efb.1718271737.git.aburgess@redhat.com > Thanks for starting this Andrew. For context into this rather obscure (nowadays) library, [1] shows the original intended design and commit fa593d66d5696018bc8fb166f9e2a960d484ccd0 is the first pushed change to add the IPA, from what I could track down. [1] https://sourceware.org/legacy-ml/gdb/2011-12/msg00004.html [2] fa593d66d5696018bc8fb166f9e2a960d484ccd0 I think some of the design bits never made it into upstream gdb (itsets?), and the tracepoints mechanism was mostly used by non-gdbserver debugging servers, with gdbserver seemingly being more of a reference implementation. Fast-forward to today, we have a lot of multi-core/multi-threaded systems (even heterogeneous), but I can't really say the IPA library is being used more (or at all), or the way it was intended back in the day. We do use little bits (agent expressions), but not a lot. Nowadays we also have better debugging tools to do the job, not necessarily in gdb (RR, various tracing mechanisms). I think it is important to remove maintenance burden if possible, and with this perspective, I consider it is time for the IPA to go. Similarly, I also think it might be time to consider dropping the tracepoints (mainly static and fast) machinery from gdbserver, as I suspect that is another mechanism that is not being used very often. I recall trying to use tracepoints for practical purposes (back in the day), and it wasn't up to the task, being too cumbersome to use, having bad failure modes and having other security implications when trying to debug stuff in production platforms. The remote protocol side of it is OK, but again, I bet no debugging stubs are using that anymore.