Re: [patch] Implement qXfer:libraries for Linux/gdbserver [Was: Re: [RFC] Make target_read_string faster over high-latency links.]

Jan Kratochvil
2011-08-08T18:36:34Z

On Fri, 05 Aug 2011 20:10:09 +0200, Paul Pluzhnikov wrote:
> Moving solib-svr4.c to gdb/common doesn't appear necessary: the parts
> that I would have used in gdbserver/linux-low.c are quite small, and not
> easily re-usable.

GDB could reuse solib-target.c and split solib-svr4.c to the small part
getting the library list - providing it for UNIX *-nat.c files as
TARGET_OBJECT_LIBRARIES - and the other UNIX code useful in both local and
remote cases there.

It would make libexpat mandatory even for the linux-nat.c usage so libexpat
could be bundler into the sourceware tree.

The same way all_dlls->dll_info could be renamed and reused on the server side
even for UNIX, that would be easier.

I do not say it would say LoC but it would be more clean, currently there
would be two isolated producer + consumer pairs of the same protocol.

Sure it may not be so easy as it sounds, I have not tried it.

Thanks,
Jan