aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorMarcus Shawcroft <mshawcroft@sourceware.org>2013-02-07 17:32:29 +0000
committerMarcus Shawcroft <mshawcroft@sourceware.org>2013-02-07 17:32:29 +0000
commit148de6bbb5fb9dc360a7e28e0c75d638e02caf1e (patch)
tree2472c3c128524378f2b5eda00888f0fd290eb9ab /gdb/gdbserver
parent907b01b73a786f82f9ea1be03fae9631df326bc2 (diff)
downloadgdb-148de6bbb5fb9dc360a7e28e0c75d638e02caf1e.zip
gdb-148de6bbb5fb9dc360a7e28e0c75d638e02caf1e.tar.gz
gdb-148de6bbb5fb9dc360a7e28e0c75d638e02caf1e.tar.bz2
2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
* linux-aarch64-low.c (aarch64_arch_setup): Clamp aarch64_num_wp_regs and aarch64_num_bp_regs to AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog6
-rw-r--r--gdb/gdbserver/linux-aarch64-low.c20
2 files changed, 19 insertions, 7 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index f26620b..f2d41d8 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,11 @@
2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
+ * linux-aarch64-low.c (aarch64_arch_setup): Clamp
+ aarch64_num_wp_regs and aarch64_num_bp_regs to
+ AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
+
+2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
* linux-aarch64-low.c (ps_get_thread_area): Replace
PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index 883277c..9dcfc55 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -1202,10 +1202,13 @@ aarch64_arch_setup (void)
&& AARCH64_DEBUG_ARCH (dreg_state.dbg_info) == AARCH64_DEBUG_ARCH_V8)
{
aarch64_num_wp_regs = AARCH64_DEBUG_NUM_SLOTS (dreg_state.dbg_info);
- if (aarch64_num_wp_regs > AARCH64_HBP_MAX_NUM)
- warning ("Unexpected number of hardware watchpoint registers reported"
- " by ptrace, got %d, expected %d.",
- aarch64_num_wp_regs, AARCH64_HBP_MAX_NUM);
+ if (aarch64_num_wp_regs > AARCH64_HWP_MAX_NUM)
+ {
+ warning ("Unexpected number of hardware watchpoint registers reported"
+ " by ptrace, got %d, expected %d.",
+ aarch64_num_wp_regs, AARCH64_HWP_MAX_NUM);
+ aarch64_num_wp_regs = AARCH64_HWP_MAX_NUM;
+ }
}
else
{
@@ -1220,9 +1223,12 @@ aarch64_arch_setup (void)
{
aarch64_num_bp_regs = AARCH64_DEBUG_NUM_SLOTS (dreg_state.dbg_info);
if (aarch64_num_bp_regs > AARCH64_HBP_MAX_NUM)
- warning ("Unexpected number of hardware breakpoint registers reported"
- " by ptrace, got %d, expected %d.",
- aarch64_num_bp_regs, AARCH64_HBP_MAX_NUM);
+ {
+ warning ("Unexpected number of hardware breakpoint registers reported"
+ " by ptrace, got %d, expected %d.",
+ aarch64_num_bp_regs, AARCH64_HBP_MAX_NUM);
+ aarch64_num_bp_regs = AARCH64_HBP_MAX_NUM;
+ }
}
else
{