Most of the complicated parts of the remote shared library code deal
with adding or removing a single library (the T packed "load" and
"unload" responses). For solib-svr4 targets we read the shared
library list from the target at each solib event; this is slow, but
not that slow. Reading the whole list using qXfer:libraries:read
would still be faster than that, since we would not need to chase a
linked list.
So, is the ability to report and handle single load events useful?
It will surely speed up one use case - "continue" through a loop that
constantly loads and unloads a shared library - but I think that may
not be an important case.
Pedro, Jim, what do you think? If it's not important, I can easily
make GDB request the whole list. I can probably strip out a few
hundred lines of code that way, and avoid a thorny protocol design
problem (how to use XML content in qXfer:libraries:read, without
having escaping problems in the T packet response).