public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-jankratochvil-fedora17: Merge remote-tracking branch 'archer/archer-jankratochvil-watchpoint3' into archer-jankratochvil-fedora17
@ 2012-01-05  9:19 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2012-01-05  9:19 UTC (permalink / raw)
  To: archer-commits

The branch, archer-jankratochvil-fedora17 has been updated
       via  9d032ca6bf6de39c55d99ffc09056683c7a6498b (commit)
       via  d925b6a8caa570f6419f08428cdd12423a73ef51 (commit)
       via  a175f71b10e273753a53daf8959bb06dc44700e2 (commit)
       via  ad61c29ff0157c81b0f5bb9a9c96e21e7756dba0 (commit)
      from  8cc17242e1d8f61a4aabc9e08e4272e8dbe77e52 (commit)

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

- Log -----------------------------------------------------------------
commit 9d032ca6bf6de39c55d99ffc09056683c7a6498b
Merge: 8cc1724 d925b6a
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Thu Jan 5 10:19:14 2012 +0100

    Merge remote-tracking branch 'archer/archer-jankratochvil-watchpoint3' into archer-jankratochvil-fedora17

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

Summary of changes:
 gdb/s390-nat.c |   55 +++++++------------------------------------------------
 1 files changed, 7 insertions(+), 48 deletions(-)

First 500 lines of diff:
diff --git a/gdb/s390-nat.c b/gdb/s390-nat.c
index 883620c..0c2ea24 100644
--- a/gdb/s390-nat.c
+++ b/gdb/s390-nat.c
@@ -438,36 +438,11 @@ struct watch_area
   CORE_ADDR hi_addr;
 };
 
-/* Per-inferior data key.  */
-
-struct s390_inferior_data
-  {
-    struct watch_area *watch_base;
-  };
-
-static struct s390_inferior_data *
-s390_inferior_data_get (void)
-{
-  /* Intermediate patch stub.  */
-  static struct i386_inferior_data inf_data_local;
-  struct inferior *inf = current_inferior ();
-  struct i386_inferior_data *inf_data = &inf_data_local;
-
-  return inf->pid == ptid_get_pid (inferior_ptid) ? inf_data : NULL;
-}
-
-static struct watch_area *
-s390_watch_base_get (void)
-{
-  struct s390_inferior_data *inferior_data = s390_inferior_data_get ();
-
-  return inferior_data ? inferior_data->watch_base : NULL;
-}
+static struct watch_area *watch_base = NULL;
 
 static int
 s390_stopped_by_watchpoint (void)
 {
-  struct watch_area *watch_base = s390_watch_base_get ();
   per_lowcore_bits per_lowcore;
   ptrace_area parea;
   int result;
@@ -496,13 +471,9 @@ s390_stopped_by_watchpoint (void)
   return result;
 }
 
-/* Update hardware registers of this specific LP.  LP must belong to
-   CURRENT_INFERIOR.  */
-
 static void
 s390_fix_watch_points (struct lwp_info *lp)
 {
-  struct watch_area *watch_base;
   int tid;
 
   per_struct per_info;
@@ -511,20 +482,9 @@ s390_fix_watch_points (struct lwp_info *lp)
   CORE_ADDR watch_lo_addr = (CORE_ADDR)-1, watch_hi_addr = 0;
   struct watch_area *area;
 
-  gdb_assert (lp == NULL || current_inferior ()->pid == PIDGET (lp->ptid));
-
-  if (lp == NULL)
-    {
-      tid = PIDGET (inferior_ptid);
-      watch_base = NULL;
-    }
-  else
-    {
-      tid = TIDGET (lp->ptid);
-      if (tid == 0)
-	tid = PIDGET (lp->ptid);
-      watch_base = s390_watch_base_get ();
-    }
+  tid = TIDGET (lp->ptid);
+  if (tid == 0)
+    tid = PIDGET (lp->ptid);
 
   for (area = watch_base; area; area = area->next)
     {
@@ -555,8 +515,7 @@ s390_fix_watch_points (struct lwp_info *lp)
     perror_with_name (_("Couldn't modify watchpoint status"));
 }
 
-/* Callback for linux_nat_iterate_watchpoint_lwps,
-   to call s390_fix_watch_points.  */
+/* Callback for iterate_over_lwps, to call s390_fix_watch_points.  */
 
 static int
 s390_fix_watch_points_iterate (struct lwp_info *lp, void *arg)
@@ -583,7 +542,7 @@ s390_insert_watchpoint (CORE_ADDR addr, int len, int type,
   area->next = watch_base;
   watch_base = area;
 
-  linux_nat_iterate_watchpoint_lwps (s390_fix_watch_points_iterate, NULL);
+  iterate_over_lwps (minus_one_ptid, s390_fix_watch_points_iterate, NULL);
 
   return 0;
 }
@@ -611,7 +570,7 @@ s390_remove_watchpoint (CORE_ADDR addr, int len, int type,
   *parea = area->next;
   xfree (area);
 
-  linux_nat_iterate_watchpoint_lwps (s390_fix_watch_points_iterate, NULL);
+  iterate_over_lwps (minus_one_ptid, s390_fix_watch_points_iterate, NULL);
 
   return 0;
 }


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-05  9:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-05  9:19 [SCM] archer-jankratochvil-fedora17: Merge remote-tracking branch 'archer/archer-jankratochvil-watchpoint3' into archer-jankratochvil-fedora17 jkratoch

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).