public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
From: jkratoch@sourceware.org
To: archer-commits@sourceware.org
Subject: [SCM]  archer-jankratochvil-watchpoint3: Merge branch 'f-cleanup-fork-multifix' into archer-jankratochvil-watchpoint3
Date: Mon, 02 Jan 2012 16:46:00 -0000	[thread overview]
Message-ID: <20120102164603.6015.qmail@sourceware.org> (raw)

The branch, archer-jankratochvil-watchpoint3 has been updated
       via  aa04840a371c3d9c7144bd651370c83319f728b3 (commit)
       via  ad779fb7f4048f24e833f624d7589ed44619ae90 (commit)
       via  204b4630223c1c4b0b8969e613430e62ee84e536 (commit)
       via  5c4f24499078aa0c166de27f4f6956a0c89a9b6f (commit)
       via  9aa2a5a8cab49edc6432a0f956ca97d5dcf9ad4d (commit)
       via  e9c5fe9151d5df98df3d3dba7a937861bdd728c8 (commit)
      from  26385102b3c639bff7435c6dd1191538511b5216 (commit)

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

- Log -----------------------------------------------------------------
commit aa04840a371c3d9c7144bd651370c83319f728b3
Merge: 2638510 ad779fb
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Jan 2 17:45:45 2012 +0100

    Merge branch 'f-cleanup-fork-multifix' into archer-jankratochvil-watchpoint3

commit ad779fb7f4048f24e833f624d7589ed44619ae90
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Jan 2 17:27:22 2012 +0100

    .

commit 204b4630223c1c4b0b8969e613430e62ee84e536
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Jan 2 17:25:37 2012 +0100

    .

commit 5c4f24499078aa0c166de27f4f6956a0c89a9b6f
Merge: b7ef56f 9aa2a5a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Jan 2 17:17:26 2012 +0100

    Merge branch 'f-cleanup-fork' into f-cleanup-fork-multifix
    
    Conflicts:
    	gdb/i386-nat.c

commit 9aa2a5a8cab49edc6432a0f956ca97d5dcf9ad4d
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Jan 2 17:12:14 2012 +0100

    .

commit e9c5fe9151d5df98df3d3dba7a937861bdd728c8
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Jan 2 17:03:00 2012 +0100

    .

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

Summary of changes:
 gdb/i386-linux-nat.c                               |    4 ++--
 gdb/i386-nat.c                                     |   18 ++++++++++++++++--
 gdb/testsuite/gdb.multi/watchpoint-multi.c         |    2 +-
 gdb/testsuite/gdb.multi/watchpoint-multi.exp       |    8 +++++---
 gdb/testsuite/gdb.threads/watchpoint-fork-child.c  |    2 +-
 gdb/testsuite/gdb.threads/watchpoint-fork-mt.c     |    2 +-
 gdb/testsuite/gdb.threads/watchpoint-fork-parent.c |    2 +-
 gdb/testsuite/gdb.threads/watchpoint-fork-st.c     |    2 +-
 gdb/testsuite/gdb.threads/watchpoint-fork.exp      |    4 ++--
 gdb/testsuite/gdb.threads/watchpoint-fork.h        |    2 +-
 10 files changed, 31 insertions(+), 15 deletions(-)

First 500 lines of diff:
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index 241f8ac..9e60ff4 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -771,8 +771,8 @@ i386_linux_prepare_to_resume (struct lwp_info *lwp)
       struct i386_debug_reg_state *state = i386_debug_reg_state ();
       int i;
 
-      /* The amd64 counterpart and description
-	 is amd64_linux_dr_set_control.  */
+      /* See amd64_linux_prepare_to_resume for Linux kernel note on
+	 i386_linux_dr_set calls ordering.  */
 
       for (i = DR_FIRSTADDR; i <= DR_LASTADDR; i++)
 	if (state->dr_ref_count[i] > 0)
diff --git a/gdb/i386-nat.c b/gdb/i386-nat.c
index 11d07bc..bb31d9e 100644
--- a/gdb/i386-nat.c
+++ b/gdb/i386-nat.c
@@ -174,12 +174,15 @@ i386_init_dregs (struct i386_debug_reg_state *state)
 /* Per-inferior data key.  */
 static const struct inferior_data *i386_inferior_data;
 
+/* Per-inferior data.  */
 struct i386_inferior_data
   {
     /* Copy of i386 hardware debug registers for performance reasons.  */
     struct i386_debug_reg_state state;
   };
 
+/* Per-inferior hook for register_inferior_data_with_cleanup.  */
+
 static void
 i386_inferior_data_cleanup (struct inferior *inf, void *arg)
 {
@@ -188,6 +191,9 @@ i386_inferior_data_cleanup (struct inferior *inf, void *arg)
   xfree (inf_data);
 }
 
+/* Get data specific for INFERIOR_PTID LWP.  Return special data area
+   for processes being detached.  */
+
 static struct i386_inferior_data *
 i386_inferior_data_get (void)
 {
@@ -203,14 +209,18 @@ i386_inferior_data_get (void)
 
   if (inf->pid != ptid_get_pid (inferior_ptid))
     {
+      /* INFERIOR_PTID is being detached from the inferior INF.
+	 Provide local cache specific for the detached LWP.  */
+
       static struct i386_inferior_data detached_inf_data_local;
       static int detached_inf_pid = -1;
 
       if (detached_inf_pid != ptid_get_pid (inferior_ptid))
 	{
-	  detached_inf_pid = ptid_get_pid (inferior_ptid);
+	  /* Reinitialize the local cache if INFERIOR_PTID is
+	     different from the LWP last detached.
  
-	  /* Linux kernel before 2.6.33 commit
+	     Linux kernel before 2.6.33 commit
 	     72f674d203cd230426437cdcf7dd6f681dad8b0d
 	     will inherit hardware debug registers from parent
 	     on fork/vfork/clone.  Newer Linux kernels create such tasks with
@@ -225,6 +235,7 @@ i386_inferior_data_get (void)
 	     registers mirror will become zeroed in the end before detaching
 	     the forked off process.  */
 
+	  detached_inf_pid = ptid_get_pid (inferior_ptid);
 	  memcpy (&detached_inf_data_local, inf_data,
 		  sizeof (detached_inf_data_local));
 	}
@@ -235,6 +246,9 @@ i386_inferior_data_get (void)
   return inf_data;
 }
 
+/* Get debug registers state for INFERIOR_PTID, see
+   i386_inferior_data_get.  */
+
 struct i386_debug_reg_state *
 i386_debug_reg_state (void)
 {
diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.c b/gdb/testsuite/gdb.multi/watchpoint-multi.c
index 4ae8e3f..51697b0 100644
--- a/gdb/testsuite/gdb.multi/watchpoint-multi.c
+++ b/gdb/testsuite/gdb.multi/watchpoint-multi.c
@@ -1,6 +1,6 @@
 /* This testcase is part of GDB, the GNU debugger.
 
-   Copyright 2010 Free Software Foundation, Inc.
+   Copyright 2012 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.exp b/gdb/testsuite/gdb.multi/watchpoint-multi.exp
index b9955bb..d7daeec 100644
--- a/gdb/testsuite/gdb.multi/watchpoint-multi.exp
+++ b/gdb/testsuite/gdb.multi/watchpoint-multi.exp
@@ -1,5 +1,5 @@
-# Copyright 2010 Free Software Foundation, Inc.
-
+# Copyright 2012 Free Software Foundation, Inc.
+#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
@@ -13,7 +13,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if { [is_remote target] || ![isnative] } then {
+if [is_remote target] {
+    # It is KFAIL.
     continue
 }
 
@@ -72,6 +73,7 @@ gdb_test_multiple $test $test {
     }
     -re "There are not enough available hardware resources for this watchpoint\\.\r\n$gdb_prompt $" {
 	untested $test
+	return
     }
 }
 
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork-child.c b/gdb/testsuite/gdb.threads/watchpoint-fork-child.c
index e6c39cf..7a7e07f 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork-child.c
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork-child.c
@@ -1,6 +1,6 @@
 /* Test case for forgotten hw-watchpoints after fork()-off of a process.
 
-   Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright 2012 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c b/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
index 08a5aff..bfdd89f 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork-mt.c
@@ -1,6 +1,6 @@
 /* Test case for forgotten hw-watchpoints after fork()-off of a process.
 
-   Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright 2012 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork-parent.c b/gdb/testsuite/gdb.threads/watchpoint-fork-parent.c
index 82d1182..9bbf438 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork-parent.c
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork-parent.c
@@ -1,6 +1,6 @@
 /* Test case for forgotten hw-watchpoints after fork()-off of a process.
 
-   Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright 2012 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork-st.c b/gdb/testsuite/gdb.threads/watchpoint-fork-st.c
index a7eeedd..17cc058 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork-st.c
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork-st.c
@@ -1,6 +1,6 @@
 /* Test case for forgotten hw-watchpoints after fork()-off of a process.
 
-   Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright 2012 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork.exp b/gdb/testsuite/gdb.threads/watchpoint-fork.exp
index 117700b..2e01344 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork.exp
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork.exp
@@ -1,5 +1,5 @@
-# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
-
+# Copyright 2012 Free Software Foundation, Inc.
+#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork.h b/gdb/testsuite/gdb.threads/watchpoint-fork.h
index 31f7656..cb109fa 100644
--- a/gdb/testsuite/gdb.threads/watchpoint-fork.h
+++ b/gdb/testsuite/gdb.threads/watchpoint-fork.h
@@ -1,6 +1,6 @@
 /* Test case for forgotten hw-watchpoints after fork()-off of a process.
 
-   Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright 2012 Free Software Foundation, Inc.
 
    This file is part of GDB.
 


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


             reply	other threads:[~2012-01-02 16:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-02 16:46 jkratoch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-30 16:58 jkratoch
2012-01-24 14:19 jkratoch
2012-01-20 20:16 jkratoch
2012-01-20 11:07 jkratoch
2012-01-20  1:30 jkratoch
2012-01-20  1:20 jkratoch
2012-01-05  9:18 jkratoch
2012-01-02 22:43 jkratoch
2012-01-02 15:19 jkratoch
2011-12-26 23:24 jkratoch
2011-12-26 22:04 jkratoch
2011-12-26 20:32 jkratoch
2011-12-26 19: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=20120102164603.6015.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).