public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  archer-jankratochvil-watchpoint3: ppc-linux-nat tested on RHEL-6 ppc64 non-BookE:
@ 2010-12-06  6:22 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2010-12-06  6:22 UTC (permalink / raw)
  To: archer-commits

The branch, archer-jankratochvil-watchpoint3 has been updated
       via  cbb1550e0c62473a211b40da706e199364a23036 (commit)
      from  721960130d1919b9f0ee7ca2bb045871ee208790 (commit)

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

- Log -----------------------------------------------------------------
commit cbb1550e0c62473a211b40da706e199364a23036
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
Date:   Mon Dec 6 07:19:18 2010 +0100

    ppc-linux-nat tested on RHEL-6 ppc64 non-BookE:
    
    FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the first fork
    FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the first fork
    FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: breakpoint after the second fork
    FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: watchpoint after the second fork
    FAIL: gdb.threads/watchpoint-fork.exp: child: singlethreaded: finish
    FAIL: gdb.threads/watchpoint-fork.exp: child: multithreaded: breakpoint (A) after the first fork
    FAIL: gdb.threads/watchpoint-fork.exp: child: multithreaded: watchpoint A after the first fork
    FAIL: gdb.threads/watchpoint-fork.exp: child: multithreaded: watchpoint B after the first fork
    FAIL: gdb.threads/watchpoint-fork.exp: child: multithreaded: breakpoint (A) after the second fork
    FAIL: gdb.threads/watchpoint-fork.exp: child: multithreaded: watchpoint A after the second fork
    FAIL: gdb.threads/watchpoint-fork.exp: child: multithreaded: watchpoint B after the second fork
    FAIL: gdb.threads/watchpoint-fork.exp: child: multithreaded: finish
    
    but that is due to:
    
    Error in re-setting breakpoint 1: reading register r31 (#31): No such process.^M
    Error in re-setting breakpoint 3: reading register r31 (#31): No such process.^M
    Error in re-setting breakpoint 4: reading register r31 (#31): No such process.^M

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

Summary of changes:
 gdb/ppc-linux-nat.c |   54 +++++++++++++++++++++++++++++---------------------
 1 files changed, 31 insertions(+), 23 deletions(-)

First 500 lines of diff:
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 18ddee7..e4a70ee 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -1620,12 +1620,18 @@ booke_remove_point (struct ppc_hw_breakpoint *b, int tid)
   hw_breaks[i].hw_break = NULL;
 }
 
+static void
+booke_insert_point_callback (int tid, void *pp_voidp)
+{
+  struct ppc_hw_breakpoint *pp = pp_voidp;
+
+  booke_insert_point (pp, tid);
+}
+
 static int
 ppc_linux_insert_hw_breakpoint (struct gdbarch *gdbarch,
 				  struct bp_target_info *bp_tgt)
 {
-  ptid_t ptid;
-  struct lwp_info *lp;
   struct ppc_hw_breakpoint p;
 
   if (!have_ptrace_booke_interface ())
@@ -1639,18 +1645,23 @@ ppc_linux_insert_hw_breakpoint (struct gdbarch *gdbarch,
   p.addr2           = 0;
   p.condition_value = 0;
 
-  ALL_LWPS (lp, ptid)
-    booke_insert_point (&p, TIDGET (ptid));
+  linux_nat_iterate_watchpoint_lwps (booke_insert_point_callback, &p);
 
   return 0;
 }
 
+static void
+booke_remove_point_callback (int tid, void *pp_voidp)
+{
+  struct ppc_hw_breakpoint *pp = pp_voidp;
+
+  booke_remove_point (pp, tid);
+}
+
 static int
 ppc_linux_remove_hw_breakpoint (struct gdbarch *gdbarch,
 				  struct bp_target_info *bp_tgt)
 {
-  ptid_t ptid;
-  struct lwp_info *lp;
   struct ppc_hw_breakpoint p;
 
   if (!have_ptrace_booke_interface ())
@@ -1664,8 +1675,7 @@ ppc_linux_remove_hw_breakpoint (struct gdbarch *gdbarch,
   p.addr2           = 0;
   p.condition_value = 0;
 
-  ALL_LWPS (lp, ptid)
-    booke_remove_point (&p, TIDGET (ptid));
+  linux_nat_iterate_watchpoint_lwps (booke_remove_point_callback, &p);
 
   return 0;
 }
@@ -1878,12 +1888,19 @@ ppc_linux_can_accel_watchpoint_condition (CORE_ADDR addr, int len, int rw,
 	  && check_condition (addr, cond, &data_value));
 }
 
+static void
+set_saved_dabr_value_callback (int tid, void *retp_voidp)
+{
+  int *retp = retp_voidp;
+
+  if (ptrace (PTRACE_SET_DEBUGREG, tid, 0, saved_dabr_value) < 0)
+    *retp = -1;
+}
+
 static int
 ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
 			     struct expression *cond)
 {
-  struct lwp_info *lp;
-  ptid_t ptid;
   int ret = -1;
 
   if (have_ptrace_booke_interface ())
@@ -1907,8 +1924,7 @@ ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
       p.addr            = (uint64_t) addr;
       p.addr2           = 0;
 
-      ALL_LWPS (lp, ptid)
-	booke_insert_point (&p, TIDGET (ptid));
+      linux_nat_iterate_watchpoint_lwps (booke_insert_point_callback, &p);
 
       ret = 0;
     }
@@ -1951,12 +1967,8 @@ ppc_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
 
       saved_dabr_value = dabr_value;
 
-      ALL_LWPS (lp, ptid)
-	if (ptrace (PTRACE_SET_DEBUGREG, TIDGET (ptid), 0,
-		    saved_dabr_value) < 0)
-	  return -1;
-
       ret = 0;
+      linux_nat_iterate_watchpoint_lwps (set_saved_dabr_value_callback, &ret);
     }
 
   return ret;
@@ -1991,20 +2003,16 @@ ppc_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw,
       p.addr            = (uint64_t) addr;
       p.addr2           = 0;
 
-      ALL_LWPS (lp, ptid)
-	booke_remove_point (&p, TIDGET (ptid));
+      linux_nat_iterate_watchpoint_lwps (booke_remove_point_callback, &p);
 
       ret = 0;
     }
   else
     {
       saved_dabr_value = 0;
-      ALL_LWPS (lp, ptid)
-	if (ptrace (PTRACE_SET_DEBUGREG, TIDGET (ptid), 0,
-		    saved_dabr_value) < 0)
-	  return -1;
 
       ret = 0;
+      linux_nat_iterate_watchpoint_lwps (set_saved_dabr_value_callback, &ret);
     }
 
   return ret;


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


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

only message in thread, other threads:[~2010-12-06  6:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-06  6:22 [SCM] archer-jankratochvil-watchpoint3: ppc-linux-nat tested on RHEL-6 ppc64 non-BookE: 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).