When we receive an svr4 packet from the remote, we check for new modules
and add them to the list of images in the target. However, we did not
do the same for modules which have been removed.
This was causing TestLoadUnload to fail when using ds2, which uses
svr4 packets to communicate all library info on Linux. This patch fixes
the failing test.
It looks like this code will unload any modules currently listed as loaded via m_process->GetTarget().GetImages(), if they do not appear in the module_list argument to this function. Is that correct behavior? (It might be, but that's not what I would have guessed without digging deeper).
I might be not following the flow here correctly, though. Can you clarify? Did the full test suite run with this change? Thanks!