2013-05-17 Edjunior Machado <emachado@linux.vnet.ibm.com>
authorEdjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
Fri, 17 May 2013 23:05:00 +0000 (23:05 +0000)
committerEdjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
Fri, 17 May 2013 23:05:00 +0000 (23:05 +0000)
* ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Check if the
region is ok for a hardware watchpoint using the new ptrace interface
on Power servers.

gdb/ChangeLog
gdb/ppc-linux-nat.c

index 0a6694434aad1b1fdd9188355e2b8c9b99619bd0..d10eb650be6efad9c569a91a7683f17adc3154db 100644 (file)
@@ -1,3 +1,9 @@
+2013-05-17  Edjunior Machado  <emachado@linux.vnet.ibm.com>
+
+       * ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Check if the
+       region is ok for a hardware watchpoint using the new ptrace interface
+       on Power servers.
+
 2013-05-17  Doug Evans  <dje@google.com>
 
        * NEWS: Mention new maintenance commands check-symtabs, and
index 280dcbe887c4e42de2f78e1645209e9a88a1995f..1ff00a6d04e6251eb5206b0d5b041be297d543be 100644 (file)
@@ -1503,16 +1503,19 @@ ppc_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
      to determine the hardcoded watchable region for watchpoints.  */
   if (have_ptrace_booke_interface ())
     {
-      /* DAC-based processors (i.e., embedded processors), like the PowerPC 440
-        have ranged watchpoints and can watch any access within an arbitrary
-        memory region.  This is useful to watch arrays and structs, for
-        instance.  It takes two hardware watchpoints though.  */
+      /* Embedded DAC-based processors, like the PowerPC 440 have ranged
+        watchpoints and can watch any access within an arbitrary memory
+        region. This is useful to watch arrays and structs, for instance.  It
+         takes two hardware watchpoints though.  */
       if (len > 1
-         && booke_debug_info.features & PPC_DEBUG_FEATURE_DATA_BP_RANGE)
+         && booke_debug_info.features & PPC_DEBUG_FEATURE_DATA_BP_RANGE
+         && ppc_linux_get_hwcap () & PPC_FEATURE_BOOKE)
        return 2;
-      else if (booke_debug_info.data_bp_alignment
-              && (addr + len > (addr & ~(booke_debug_info.data_bp_alignment - 1))
-                  + booke_debug_info.data_bp_alignment))
+      /* Server processors provide one hardware watchpoint and addr+len should
+         fall in the watchable region provided by the ptrace interface.  */
+      if (booke_debug_info.data_bp_alignment
+         && (addr + len > (addr & ~(booke_debug_info.data_bp_alignment - 1))
+             + booke_debug_info.data_bp_alignment))
        return 0;
     }
   /* addr+len must fall in the 8 byte watchable region for DABR-based
This page took 0.028222 seconds and 4 git commands to generate.