public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: jkratoch@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  jankratochvil/gdbserverbuildid: Locate solib files via build-id
Date: Mon, 24 Mar 2014 04:57:00 -0000	[thread overview]
Message-ID: <20140324045735.5051.qmail@sourceware.org> (raw)

The branch, jankratochvil/gdbserverbuildid has been updated
  discards  aa7388d4a41ace67fbb765aefb0be6d2ea696287 (commit)
  discards  3f5760079eaa9b26e4cdd857f225c635cb0391b4 (commit)
  discards  67643e85f38259159dfe46de205c506de5342ed1 (commit)
  discards  eb7f9e4bfa5d3b382a42a938090f2a001b9ed81b (commit)
       via  9a55d97b9ecf35edf74fe8a098055e7022b2c783 (commit)
       via  44d174c7e81b033ec87ce55e82f731e2d1da3182 (commit)
       via  626cc0e72e235a1a87e07c1d7bae34d2aa3a77be (commit)
       via  041741fef5261c22c998f501f4abc95600e7e4a6 (commit)
      from  aa7388d4a41ace67fbb765aefb0be6d2ea696287 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 9a55d97b9ecf35edf74fe8a098055e7022b2c783
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 04:30:57 2014 +0100

    Locate solib files via build-id
    
    Hi,
    
    this is a new functionality that the file itself (*) it found via build-id, if
    the regular name-located file does not match inferior build-id or if the
    named-located file even does not exist.
    
    I am not completely sure with the SO->SO_NAME initialization.  It cannot be
    a regression but not sure how it should behave for the build-id-located files.
    Currently the original target filename is kept but the comment there says is
    may confuse MI frontends.  OTOH putting there the build-id located file will
    show its build-id name in SO_NAME which is also wrong.
    
    (*) /usr/lib/libxxx.so, not /usr/lib/debug/usr/lib/libxxx.so.debug.
        Although GDB uses only symbols from that file so in fact the *.debug file
        would be sufficient.  But for example .symtab is sometimes only in the .so
        file and not the .so.debug file so GDB looks up .so as the associated
        .so.debug file gets loaded automatically on top of .so anyway.
    
    
    Thanks,
    Jan
    
    
    gdb/
    2014-03-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	Locate solib files via build-id.
    	* build-id.c (build_id_so_validate): Remove const from the parameter,
    	return void.  Handle also NULL SO->ABFD.  Call also build_id_to_bfd.
    	* build-id.h (build_id_so_validate): Update declaration.
    	* solib.c (solib_map_sections): Move SO->SO_NAME earlier.  Call
    	VALIDATE even for NULL SO->ABFD.  No longer free SO->ABFD on failed
    	VALIDATE.
    	(default_solib_validate): Update its const and return value.
    	* solib.h (default_solib_validate): Update declaration.
    	* solist.h (struct target_so_ops): Update definition of field validate.
    
    gdb/testsuite/
    2014-03-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	Locate solib files via build-id.
    	* gdb.base/solib-mismatch.exp (nocrlf, expected_header): Make
    	solib_matching_test variables global.
    	(solib_locate_test): New proc.
    	(locate non-matching shared library)
    	(locate non-existing shared library): New tests.

commit 44d174c7e81b033ec87ce55e82f731e2d1da3182
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 04:30:57 2014 +0100

    Code cleanup: solib_map_sections abfd var
    
    Hi,
    
    just remove a local variable holding so->abfd copy as so->abfd may change in
    the next patch.
    
    
    Jan
    
    
    gdb/
    2014-03-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* solib.c (solib_map_sections): Remove variable abfd.

commit 626cc0e72e235a1a87e07c1d7bae34d2aa3a77be
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 04:30:57 2014 +0100

    Tests for validate symbol file using build-id
    
    
    Hi,
    
    new testcase.
    
    
    Jan
    
    
    gdb/testsuite/
    2014-02-26  Aleksandar Ristovski  <aristovski@qnx.com
    
    	Tests for validate symbol file using build-id.
    	* gdb.base/solib-mismatch-lib.c: New file.
    	* gdb.base/solib-mismatch-libmod.c: New file.
    	* gdb.base/solib-mismatch.c: New file.
    	* gdb.base/solib-mismatch.exp: New file.

commit 041741fef5261c22c998f501f4abc95600e7e4a6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Mar 24 04:30:57 2014 +0100

    Validate symbol file using build-id
    
    
    Hi,
    
    consumer part of the "build-id" attribute.
    
    
    Jan
    
    
    gdb/
    2014-02-26  Aleksandar Ristovski  <aristovski@qnx.com
    	    Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	Validate symbol file using build-id.
    	* NEWS (Changes since GDB 7.7): Add 'set build-id-force'
    	and 'show build-id-force'.  Add build-id attribute.
    	* build-id.c: Include solist.h, rsp-low.h and gdbcmd.h.
    	(build_id_force, show_build_id_force): New.
    	(build_id_verify): Use BUILD_ID_FORCE.
    	(build_id_to_debug_bfd): Rename to ...
    	(build_id_to_bfd): ... here.  Add parameter suffix.
    	(build_id_to_debug_bfd): New wrapper of build_id_to_bfd.
    	(build_id_so_validate, _initialize_build_id): New.
    	* build-id.h (build_id_so_validate): New declaration.
    	* solib-darwin.c (_initialize_darwin_solib): Assign validate value.
    	* solib-dsbt.c (_initialize_dsbt_solib): Ditto.
    	* solib-frv.c (_initialize_frv_solib): Ditto.
    	* solib-ia64-hpux.c (ia64_hpux_target_so_ops): Ditto.
    	* solib-irix.c (_initialize_irix_solib): Ditto.
    	* solib-osf.c (_initialize_osf_solib): Ditto.
    	* solib-pa64.c (_initialize_pa64_solib): Ditto.
    	* solib-som.c (_initialize_som_solib): Ditto.
    	* solib-spu.c (set_spu_solib_ops): Ditto.
    	* solib-svr4.c: Include build-id.h and rsp-low.h.
    	(library_list_start_library): Parse 'build-id' attribute.
    	(svr4_library_attributes): Add 'build-id' attribute.
    	(_initialize_svr4_solib): Assign validate value.
    	* solib-target.c (solib.h): Include.
    	(_initialize_solib_target): Assign validate value.
    	* solib.c (solib_map_sections): Use ops->validate.
    	(free_so): Free build_id.
    	(default_solib_validate): New function.
    	* solib.h (default_solib_validate): New declaration.
    	* solist.h (struct so_list): New fields 'build_idsz' and 'build_id'.
    	(target_so_ops): New field 'validate'.
    
    gdb/doc/
    2014-03-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
    
    	* gdb.texinfo (Files): Add 'set build-id-force'
    	and 'show build-id-force'.

-----------------------------------------------------------------------

Summary of changes:
 gdb/NEWS            |    9 +++++----
 gdb/build-id.c      |    6 +++++-
 gdb/doc/gdb.texinfo |   10 +++++-----
 3 files changed, 15 insertions(+), 10 deletions(-)

First 500 lines of diff:
diff --git a/gdb/NEWS b/gdb/NEWS
index 629cc13..aeb4f9d 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -43,11 +43,12 @@ maint ada show ignore-descriptive-types
   the user manual for more details on descriptive types and the intended
   usage of this option.
 
-set solib-build-id-force (on|off)
-show solib-build-id-force
+set build-id-force (on|off)
+show build-id-force
   Inferior shared library and symbol file may contain unique build-id.
-  If both build-ids are present but they do not match then this setting
-  enables (on) or disables (off) loading of such symbol file.
+  If inferior build-ids is present but it is not identical to symbol file
+  build-id then this setting enables (on) or disables (off) loading
+  of such symbol file.
 
 * New features in the GDB remote stub, GDBserver
 
diff --git a/gdb/build-id.c b/gdb/build-id.c
index 54f9cb7..928c23c 100644
--- a/gdb/build-id.c
+++ b/gdb/build-id.c
@@ -97,13 +97,17 @@ build_id_verify (bfd *abfd, size_t check_len, const bfd_byte *check)
       xfree (message);
       return 0;
     }
-  warning (_("Shared object \"%s\" could not be validated (%s) "
+  warning (_("Symbol file \"%s\" could not be validated (%s) "
 	     "but it is being loaded due to 'set build-id-force'."),
 	   bfd_get_filename (abfd), message);
   xfree (message);
   return 1;
 }
 
+/* Find and open a BFD given a build-id.  If no BFD can be found,
+   return NULL.  Use "" or ".debug" for SUFFIX.  The returned reference to the
+   BFD must be released by the caller.  */
+
 static bfd *
 build_id_to_bfd (size_t build_id_len, const bfd_byte *build_id,
 		 const char *suffix)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 756c2c2..6901027 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -17127,20 +17127,20 @@ symbol file to be identical.  If they are not identical, then by default
 build-id while printing:
 
 @smallexample
-  warning: Shared object "libfoo.so.1" could not be validated (inferior
+  warning: Symbol file "libfoo.so.1" could not be validated (inferior
   build ID 2bc1745e does not match symbol file build ID a08f8767) and
-  will be ignored; or use 'set solib-build-id-force'.
+  will be ignored; or use 'set build-id-force'.
 @end smallexample
 
 Turning on this setting would load such symbol file while still printing:
 
 @smallexample
-  warning: Shared object "libfoo.so.1" could not be validated (inferior
+  warning: Symbol file "libfoo.so.1" could not be validated (inferior
   build ID 2bc1745e is not identical to symbol file build ID a08f8767)
-  but it is being loaded due to 'set solib-build-id-force'.
+  but it is being loaded due to 'set build-id-force'.
 @end smallexample
 
-If inferior build-id is present but it does not match symbol file build-id
+If inferior build-id is present but it is not identical to symbol file build-id
 (or the symbol file build-id is not present) then this setting enables
 (@var{mode} is @code{on}) or disables (@var{mode} is @code{off}) loading of
 such symbol file.  On systems where build-id is not present in the inferior


hooks/post-receive
--
Repository for Project Archer.


             reply	other threads:[~2014-03-24  4:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-24  4:57 jkratoch [this message]
2014-03-24 19:18 jkratoch
2014-05-17  6:02 jkratoch
2014-05-18 21:05 jkratoch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140324045735.5051.qmail@sourceware.org \
    --to=jkratoch@sourceware.org \
    --cc=archer-commits@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).