This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Tue, Jul 26, 2011 at 1:36 AM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:

> On Fri, 15 Jul 2011 20:07:48 +0200, Paul Pluzhnikov wrote:
>> This is GDB walking through the shared library list, and reading shared
>> library names from gdbserver via target_read_string 4 bytes at a time ;-(
>
> Just that you do not mention supporting qXfer:libraries:read also on GNU/Linux
> platforms (currently used only on MS-Windows)

That sounds like an excellent idea: it reduces many many packets with
just one.

> that is to move solib-svr4.c to gdb/common/ etc.

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.

Tested on Linux/x86_64 native, and with gdbserver (x86_64) against x86_64
and i686 inferiors. No regressions.


Thanks,
-- 
Paul Pluzhnikov


2011-08-05  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* solib-svr4.c (library_list_start_segment): New function.
	(library_list_start_library, library_list_end_library): Likewise.
	(library_list_start_list): Likewise.
	(segment_attributes, library_children): New variables.
	(library_attributes, library_list_children): Likewise.
	(library_list_attributes, library_list_elements): Likewise.
	(svr4_free_so): Moved to here.
	(svr4_free_library_list, svr4_parse_libraries): New functions.
	(svr4_current_sos_via_xfer_libraries): Likewise.
	(svr4_current_sos): Adjust.
	
gdbserver/ChangeLog:

2011-08-05  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* linux-low.c (linux_add_process): Adjust.
	(get_phdr_phnum_from_proc_auxv, get_dynamic): New functions.
	(get_r_debug, read_one_ptr): Likewise.
	(struct link_map_offsets): New struct decl.
	(linux_qxfer_libraries): New function.
	(struct linux_target_ops): Adjust.
	* linux-low.h (struct process_info_private): New member.
	* server.c (handle_qxfer_libraries): Adjust.
	* target.h (struct target_ops): New member.

Attachment: gdb-solib-list-20110805-2.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]