From 2268b414f486239cbcc0f756f157c3e03599efac Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Fri, 2 Dec 2011 22:26:54 +0000 Subject: gdb/ * Makefile.in (XMLFILES): Add library-list-svr4.dtd. * features/library-list-svr4.dtd: New file. * remote.c (PACKET_qXfer_libraries_svr4): New. (remote_protocol_features): new entry for PACKET_qXfer_libraries_svr4. (remote_xfer_partial): Handle TARGET_OBJECT_LIBRARIES_SVR4. * solib-svr4.c (struct svr4_library_list): New. [HAVE_LIBEXPAT]: Include xml-support.h. [HAVE_LIBEXPAT] (svr4_library_list_start_library) [HAVE_LIBEXPAT] (svr4_library_list_start_list, svr4_library_attributes) [HAVE_LIBEXPAT] (svr4_library_list_children) [HAVE_LIBEXPAT] (svr4_library_list_attributes) [HAVE_LIBEXPAT] (svr4_library_list_elements, svr4_parse_libraries) [HAVE_LIBEXPAT] (svr4_current_sos_via_xfer_libraries) [!HAVE_LIBEXPAT] (svr4_current_sos_via_xfer_libraries): New. (svr4_read_so_list): Extend the corruption message by addresses. (svr4_current_sos): New variable library_list, call svr4_current_sos_via_xfer_libraries. * target.h (enum target_object): New TARGET_OBJECT_LIBRARIES_SVR4. gdb/gdbserver/ * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug) (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4): New. (struct linux_target_ops): Install linux_qxfer_libraries_svr4. * linux-low.h (struct process_info_private): New member r_debug. * server.c (handle_qxfer_libraries): Call the_target->qxfer_libraries_svr4. (handle_qxfer_libraries_svr4): New function. (qxfer_packets): New entry "libraries-svr4". (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4. * target.h (struct target_ops): New member qxfer_libraries_svr4. * remote.c (remote_xfer_partial): Call add_packet_config_cmd for PACKET_qXfer_libraries_svr4. gdb/doc/ * gdb.texinfo (Requirements, Remote Protocol): Reference also `Library List Format for SVR4 Targets'. (General Query Packets): New item qXfer:libraries-svr4:read. (Library List Format for SVR4 Targets): New node. gdb/testsuite/ * gdb.base/solib-corrupted.exp: Suppress test on is_remote target. (corrupted list): Adjust the expectation. --- gdb/remote.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gdb/remote.c') diff --git a/gdb/remote.c b/gdb/remote.c index 6e37f69..9bfebd2 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1243,6 +1243,7 @@ enum { PACKET_qXfer_auxv, PACKET_qXfer_features, PACKET_qXfer_libraries, + PACKET_qXfer_libraries_svr4, PACKET_qXfer_memory_map, PACKET_qXfer_spu_read, PACKET_qXfer_spu_write, @@ -3748,6 +3749,8 @@ static struct protocol_feature remote_protocol_features[] = { PACKET_qXfer_features }, { "qXfer:libraries:read", PACKET_DISABLE, remote_supported_packet, PACKET_qXfer_libraries }, + { "qXfer:libraries-svr4:read", PACKET_DISABLE, remote_supported_packet, + PACKET_qXfer_libraries_svr4 }, { "qXfer:memory-map:read", PACKET_DISABLE, remote_supported_packet, PACKET_qXfer_memory_map }, { "qXfer:spu:read", PACKET_DISABLE, remote_supported_packet, @@ -8356,6 +8359,11 @@ remote_xfer_partial (struct target_ops *ops, enum target_object object, (ops, "libraries", annex, readbuf, offset, len, &remote_protocol_packets[PACKET_qXfer_libraries]); + case TARGET_OBJECT_LIBRARIES_SVR4: + return remote_read_qxfer + (ops, "libraries-svr4", annex, readbuf, offset, len, + &remote_protocol_packets[PACKET_qXfer_libraries_svr4]); + case TARGET_OBJECT_MEMORY_MAP: gdb_assert (annex == NULL); return remote_read_qxfer (ops, "memory-map", annex, readbuf, offset, len, @@ -11078,6 +11086,9 @@ Show the maximum size of the address (in bits) in a memory packet."), NULL, add_packet_config_cmd (&remote_protocol_packets[PACKET_qXfer_libraries], "qXfer:libraries:read", "library-info", 0); + add_packet_config_cmd (&remote_protocol_packets[PACKET_qXfer_libraries_svr4], + "qXfer:libraries-svr4:read", "library-info-svr4", 0); + add_packet_config_cmd (&remote_protocol_packets[PACKET_qXfer_memory_map], "qXfer:memory-map:read", "memory-map", 0); -- cgit v1.1