File gdb-aarch64-hw-break.patch of Package gdb
http://permalink.gmane.org/gmane.comp.gdb.patches/88728
http://permalink.gmane.org/gmane.comp.gdb.patches/90237
Index: gdb/aarch64-linux-nat.c
===================================================================
--- gdb/aarch64-linux-nat.c.orig
+++ gdb/aarch64-linux-nat.c
@@ -312,6 +312,7 @@ aarch64_linux_set_debug_regs (const stru
const CORE_ADDR *addr;
const unsigned int *ctrl;
+ memset (®s, 0, sizeof (regs));
iov.iov_base = ®s;
iov.iov_len = sizeof (regs);
count = watchpoint ? aarch64_num_wp_regs : aarch64_num_bp_regs;
Index: gdb/gdbserver/linux-aarch64-low.c
===================================================================
--- gdb/gdbserver/linux-aarch64-low.c.orig
+++ gdb/gdbserver/linux-aarch64-low.c
@@ -600,6 +600,7 @@ aarch64_linux_set_debug_regs (const stru
const CORE_ADDR *addr;
const unsigned int *ctrl;
+ memset (®s, 0, sizeof (regs));
iov.iov_base = ®s;
iov.iov_len = sizeof (regs);
count = watchpoint ? aarch64_num_wp_regs : aarch64_num_bp_regs;