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: sticky
Date: Thu, 13 Aug 2015 19:02:00 -0000	[thread overview]
Message-ID: <20150813190222.127933.qmail@sourceware.org> (raw)

The branch, jankratochvil/gdbserverbuildid has been updated
  discards  909dd6affb55d8b542927f5b100dbc07e4d44600 (commit)
  discards  dd1f9111db27e548ba5ee806cf5bf973d9186462 (commit)
  discards  49a92823038b0c4d2045324cfd1cffef7ba9208f (commit)
  discards  22fc794dee30a61629efb52ab01128794838d9cd (commit)
  discards  3c4181a65e97fb1b06f2b79943b8164831526352 (commit)
  discards  85e797c9c96085b1185ef56960aeb78152104929 (commit)
  discards  6f6952ad4d8a960c4dff7227c17da8e847dd934f (commit)
  discards  a9e8f9276e9e885514976e32b2fc35eb948a06a3 (commit)
  discards  891ddd140494720c0d377e93dbdf7d38ae9e87eb (commit)
  discards  cde2f3a7d920f20b13bb61829802634d3aceaca9 (commit)
  discards  52ae466c4eae8e2e57d9dc59fce60ca6c6795693 (commit)
  discards  8359c2e7189922a91d9621e297189f3cbf3295aa (commit)
  discards  46b1c839077b938af4ee1c22b10fc5609700324a (commit)
  discards  05cdf191ff60a5c977b14e2d338bf005e89ff104 (commit)
  discards  64cf1545812f341132c7bb4faad5f2938f4c931d (commit)
  discards  439ef35c5653d3a9724502ec1ad6662b1273fdb7 (commit)
  discards  6bc4d3b31dbfa2996a329a350664a9eef4e2fe15 (commit)
  discards  bfde840e829396b99837812d568e945632ab49ff (commit)
       via  d2ef8af905e3c800284385c8690da040302328ae (commit)
       via  8f5e9db1cf58809678aab42fa58c37f03029e630 (commit)
       via  e53bb70e546bd8c522b699f7dd1c39795534eade (commit)
       via  e2a7020361598cf9b3e6fa54d7d0bcea78e9fae6 (commit)
       via  6a4c1b31f5bf5e796336de40689bbd4bfc047a5e (commit)
       via  7364e72a472c8f95977aec0b8804cf42dcd86eb2 (commit)
       via  ad2f3404e4a1666cf691566f41c33e1adb45817d (commit)
       via  d9eb82ccf176f569cf9b1bea4d057372abd8be7b (commit)
       via  1da182968922bded291ef015b2e9ae098021de43 (commit)
       via  3011db9cf05c1553bb7e227687190c0f26b32c58 (commit)
       via  3ea6568826aaa1dc73f2ed9cea77dbd763e0633e (commit)
       via  cd1049766a086d465a13f60db4b1b1ba2ff0e2c2 (commit)
       via  3e4d2a0385640ed6c9a5edd0a4a07ec1483ed6de (commit)
       via  6545df5ecd569693f1c201206a2501d249bdc6a8 (commit)
       via  a6d3a59c67567e73474c5944ee058480bb759a89 (commit)
       via  fc9bc2b2606abb979bf3aae46464a86472158e71 (commit)
       via  e5b168bf9555d5f4d4f870c9db4d71d41ab2f35d (commit)
       via  83b9bd71abd6eebb7f096e05e6d28cd2209765a1 (commit)
      from  909dd6affb55d8b542927f5b100dbc07e4d44600 (commit)

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

- Log -----------------------------------------------------------------
commit d2ef8af905e3c800284385c8690da040302328ae
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:20 2015 +0200

    sticky
    
    Message-Id: <1433754079-10395-1-git-send-email-gbenson@redhat.com>
    
    Philippe Waroquiers wrote:
    > On Fri, 2015-06-05 at 12:22 +0100, Gary Benson wrote:
    > > Built and regtested on RHEL6.6 x86_64.
    > I tested with the last SVN version of the Valgrind gdbserver (that
    > supports qXfer:exec-file:read+).
    >
    > The patch introduces a regression:
    > with the patch, GDB does not anymore automatically load the
    > exec-file.
    >
    > I bypassed this problem by ignoring fake_pid_p in remote.c:
    > --- a/gdb/remote.c
    > +++ b/gdb/remote.c
    > @@ -1624,9 +1624,13 @@ remote_add_inferior (int fake_pid_p, int pid, int
    > attached,
    >    inf->attach_flag = attached;
    >    inf->fake_pid_p = fake_pid_p;
    >
    > -  /* If no main executable is currently open then attempt to
    > -     open the file that was executed to create this inferior.  */
    > -  if (try_open_exec && get_exec_file (0) == NULL)
    > +  /* Attempt to open the file that was executed to create this
    > +     inferior.  If the user has explicitly specified executable
    > +     and/or symbol files then warn the user if their choices do
    > +     not match.  Otherwise, set exec_file and symfile_objfile to
    > +     the new file.  */
    > +  printf("fake_pid_p %d\n", fake_pid_p);
    > +  if (try_open_exec)// && !fake_pid_p)
    >      exec_file_locate_attach (pid, 1);
    >
    > Effectively, the printf shows that with Valgrind gdbsrv,
    > fake_pid_p value is 1.
    >
    > When ignoring fake_pid_p, GDB can properly attach
    > to different Valgrind gdbsrv, and changes of executable
    > as expected.
    
    Ah, it seems I mailed a bad patch, my apologies!  I was working on
    two fixes that touched the same line, and it looks like I rebased
    them in the wrong order.
    
    This updated patch has been created against the latest gdb/master
    (80fb91378c91a8239817a5ab2b1c3e346109db25).  Could you please try
    your tests again?
    
    Thanks,
    Gary
    
    
    ---
    On attach, GDB will only attempt to determine the main executable's
    filename if one is not already set.  This causes problems if you
    attach to one process and then attach to another: GDB will not attempt
    to discover the main executable on the second attach.  If the two
    processes have different main executable files then the symbols will
    now be wrong.  This is PR gdb/17626.
    
    In GDB some filenames are supplied by the user (e.g. using the "file"
    or "symbol-file" commands) and some are determined by GDB (e.g. while
    processing an "attach" command).  This commit updates GDB to track
    which filenames were supplied by the user.  When GDB might attempt to
    determine an executable filename and one is already set, filenames
    determined by GDB may be overridden but user-supplied filenames will
    not.
    
    gdb/ChangeLog:
    
    	PR gdb/17626
    	* progspace.h (struct program_space)
    	<pspace_exec_file_is_user_supplied>: New field.
    	<symfile_object_file_is_user_supplied>: Likewise.
    	(symfile_objfile_is_user_supplied): New macro.
    	* exec.h (exec_file_is_user_supplied): Likewise.
    	* exec.c (exec_close): Clear exec_file_is_user_supplied.
    	(exec_file_locate_attach): Remove get_exec_file check.
    	Do not replace user-supplied executable or symbol files.
    	Warn if user-supplied executable or symbol files do not
    	match discovered file.
    	(exec_file_command): Set exec_file_is_user_supplied.
    	* symfile.c (symbol_file_clear): Clear
    	symfile_objfile_is_user_supplied.
    	(symbol_file_command): Set symfile_objfile_is_user_supplied.
    	* inferior.c (add_inferior_command): Set
    	exec_file_is_user_supplied and symfile_objfile_is_user_supplied.
    	* main.c (captured_main): Likewise.
    	* infcmd.c (attach_command_post_wait): Always call
    	exec_file_locate_attach.  Only call reopen_exec_file and
    	reread_symbols if exec_file_is_user_supplied.
    	* remote.c (remote_add_inferior): Remove get_exec_file check
    	around exec_file_locate_attach.

commit 8f5e9db1cf58809678aab42fa58c37f03029e630
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:19 2015 +0200

    mainbuildid

commit e53bb70e546bd8c522b699f7dd1c39795534eade
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:19 2015 +0200

    hexallocate

commit e2a7020361598cf9b3e6fa54d7d0bcea78e9fae6
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:19 2015 +0200

    locatetest

commit 6a4c1b31f5bf5e796336de40689bbd4bfc047a5e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:19 2015 +0200

    Tests for validate symbol file using build-id
    
    New testcase.
    
    gdb/testsuite/ChangeLog
    2015-07-15  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 7364e72a472c8f95977aec0b8804cf42dcd86eb2
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:18 2015 +0200

    buildidwarn

commit ad2f3404e4a1666cf691566f41c33e1adb45817d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:18 2015 +0200

    buildidsolibbfdopen

commit d9eb82ccf176f569cf9b1bea4d057372abd8be7b
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:18 2015 +0200

    buildidverify

commit 1da182968922bded291ef015b2e9ae098021de43
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:18 2015 +0200

    buildidsolibsearch

commit 3011db9cf05c1553bb7e227687190c0f26b32c58
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:18 2015 +0200

    buildidtofile

commit 3ea6568826aaa1dc73f2ed9cea77dbd763e0633e
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:17 2015 +0200

    buildidproto

commit cd1049766a086d465a13f60db4b1b1ba2ff0e2c2
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:17 2015 +0200

    buildidtobfd

commit 3e4d2a0385640ed6c9a5edd0a4a07ec1483ed6de
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:17 2015 +0200

    buildidforcemove

commit 6545df5ecd569693f1c201206a2501d249bdc6a8
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:17 2015 +0200

    buildidfreefix

commit a6d3a59c67567e73474c5944ee058480bb759a89
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:16 2015 +0200

    openpsymfile

commit fc9bc2b2606abb979bf3aae46464a86472158e71
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:16 2015 +0200

    openpsolib

commit e5b168bf9555d5f4d4f870c9db4d71d41ab2f35d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:16 2015 +0200

    openp

commit 83b9bd71abd6eebb7f096e05e6d28cd2209765a1
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Aug 13 16:17:16 2015 +0200

    filelib

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

Summary of changes:
 gdb/source.c |    9 ++++-----
 gdb/source.h |    1 +
 2 files changed, 5 insertions(+), 5 deletions(-)

First 500 lines of diff:
diff --git a/gdb/source.c b/gdb/source.c
index 827699d..2b3650d 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -750,7 +750,7 @@ file_location_free (struct file_location *file)
 {
   if (file->fd != -1)
     {
-      if (is_target_filename (file->filename))
+      if (file->load_via_target)
 	{
 	  int target_errno;
 
@@ -785,7 +785,6 @@ struct file_location
 file_location_from_filename (const char *filename, enum openp_flags opts, size_t build_idsz, const gdb_byte *build_id)
 {
   struct file_location file;
-  int load_via_target = 0;
   struct cleanup *back_to;
 
   memset (&file, 0, sizeof (file));
@@ -798,7 +797,7 @@ file_location_from_filename (const char *filename, enum openp_flags opts, size_t
       filename += strlen (TARGET_SYSROOT_PREFIX);
       if (!target_filesystem_is_local ())
 	{
-	  load_via_target = 1;
+	  file.load_via_target = 1;
 
 	  /* gdb_bfd_fopen does not support "target:" filenames.  */
 	  if (write_files)
@@ -808,7 +807,7 @@ file_location_from_filename (const char *filename, enum openp_flags opts, size_t
 	}
     }
 
-  if (load_via_target)
+  if (file.load_via_target)
     {
       int target_errno;
 
@@ -841,7 +840,7 @@ file_location_from_filename (const char *filename, enum openp_flags opts, size_t
       return file;
     }
 
-  if (load_via_target)
+  if (file.load_via_target)
     {
       const int do_close = (opts & OPF_IS_BFD) != 0;
 
diff --git a/gdb/source.h b/gdb/source.h
index e079cf0..113957b 100644
--- a/gdb/source.h
+++ b/gdb/source.h
@@ -105,6 +105,7 @@ struct file_location
 {
   bfd *abfd;
   char *filename;
+  unsigned char load_via_target;
   int fd;
   int file_errno;
   bfd_error_type bfderr;


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


             reply	other threads:[~2015-08-13 19:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13 19:02 jkratoch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-08-16 20:12 jkratoch
2015-08-15 10:01 jkratoch
2015-08-13 14:22 jkratoch
2015-08-13 10:40 jkratoch
2015-08-12 20:24 jkratoch
2015-08-12 17:12 jkratoch
2015-08-12 16:28 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=20150813190222.127933.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).