diff options
author | Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com> | 2013-05-17 23:05:00 +0000 |
---|---|---|
committer | Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com> | 2013-05-17 23:05:00 +0000 |
commit | 4feebbddff434ff4ecfafd6fdfc8cf899563e65d (patch) | |
tree | 9e9aa2d65911c20ec63acfd1860f76bb12c09333 | |
parent | 7d0c9981dc1753663969b47221164504e71676a6 (diff) | |
download | gdb-4feebbddff434ff4ecfafd6fdfc8cf899563e65d.zip gdb-4feebbddff434ff4ecfafd6fdfc8cf899563e65d.tar.gz gdb-4feebbddff434ff4ecfafd6fdfc8cf899563e65d.tar.bz2 |
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.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/ppc-linux-nat.c | 19 |
2 files changed, 17 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0a66944..d10eb65 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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 diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index 280dcbe..1ff00a6 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -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 |