On 13-02-22 10:09 AM, Aleksandar Ristovski wrote: > On 13-01-31 09:24 AM, Aleksandar Ristovski wrote: >> On 13-01-31 01:35 AM, Jan Kratochvil wrote: >>> >>> Therefore there should be new build_id field in struct so_list where >>> svr4_current_sos_via_xfer_libraries will put it from gdbserver. In >>> local mode >>> it should remain mostly as you wrote it / as suggested in the review >>> as there >>> is currently no easy non-Linux way how to find PT_NOTE without bfd at >>> hand. >>> >>> >> >> Ok, I can add this. Will be included in the new patch. >> >> > > > I have added build-id to gdbserver response. Patch is posted here: > http://sourceware.org/ml/gdb-patches/2013-02/msg00590.html > Here is new solib validate patch utilizing build-id returned from the gdbserver when available. This patch depends on: http://sourceware.org/ml/gdb-patches/2013-02/msg00692.html Thanks, Aleksandar ChangeLog followed by testsuite changelog: DATE Aleksandar Ristovski * Makefile.in (HFILES_NO_SRCDIR): Add linux-maps.h and linux-maps.c. * common/common-utils.c (TARGET_CHAR_BIT): Define if not defined. (HOST_CHAR_BIT): Ditto. (ctype.h): Include. (string.h): Include. (assert.h): Include. (HIGH_BYTE_POSN): Moved from utils.c. (is_digit_in_base): Ditto. (digit_to_int): Ditto. (strtoulst): Ditto. (fromhex): Moved from remote.c. (hex2bin): Ditto. (tohex): Ditto. (bin2hex): Ditto. * common/common-utils.h (strtoulst): Moved from utils.h. (tohex): New declaration. (fromhex): Ditto. (hex2bin): Ditto. (bin2hex): Ditto. * common/xml-utils.h (xml_hex_encode_text): Declare. * config/i386/linux.mk (NATDEPFILES): Add linux-maps.o. * config/i386/linux64.mh (NATDEPFILES): Add linux-maps.o. * features/library-list-svr4.dtd (build-id): New attribute. * gdbserver/Makefile.in (linux-maps.o): New. * gdbserver/configure.srv (srv_tgtobj): Add linux-maps.o. * gdbserver/linux-low.c (linux-maps.h): Include. (find_memory_region_callback_data): New structure definition. (find_memory_region_callback): New forward declaration. (find_memory_region_callback): New function. (get_hex_build_id): New function. (linux_qxfer_libraries_svr4): Add hex encoded build-id to the reply. * remote-utils.c (common-utils.h): Include. (fromhex): Moved to common-utils.c. (unhexify): Use hex2bin. (tohex): Moved to common-utils.c. (hexify): Use bin2hex. * linux-tdep.c (linux-maps.h): Include. (read_mapping): Moved to linux-maps.c. (linux_find_memory_region_ftype): Moved to linux-maps.h. (linux_find_memory_regions_full): Moved to linux-maps.c. (linux_find_memory_regions): Check for fake_pid_p to match functionality of original linux_find_memory_regions_full. (linux_make_mappings_corefile_notes): Ditto. * remote.c (tohex): Remove forward declaration. (fromhex): Ditto. (hex2bin): Ditto. (bin2hex): Ditto. (fromhex): Move implementation to common-utils.c (hex2bin): Ditto. (tohex): Ditto. (bin2hex): Ditto. * tracepoint.c (hex2bin): Remove declaration. (bin2hex): Ditto. * utils.c (HIGH_BYTE_POSN): Moved to common-utils.c. (is_digit_in_base): Ditto. (digit_to_int): Ditto. (strtoulst): Ditto. * utils.h (strtoulst): Moved to common-utils.h. testsuite/ChangeLog: * gdb.base/solib-mismatch-lib.c: New file. * gdb.base/solib-mismatch-libmod.c: Ditto. * * gdb.base/solib-mismatch.c: Ditto. * * gdb.base/solib-mismatch.exp: Ditto.