This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] gdbserver, aarch64: Zero out regs in aarch64_linux_set_debug_regs.
- From: Will Newton <will dot newton at linaro dot org>
- To: gdb-patches at sourceware dot org
- Cc: patches at linaro dot org
- Date: Thu, 12 Sep 2013 16:38:32 +0100
- Subject: [PATCH] gdbserver, aarch64: Zero out regs in aarch64_linux_set_debug_regs.
- Authentication-results: sourceware.org; auth=none
Apply the same fix that was applied to aarch64-linux-nat.c.
2013-09-12 Will Newton <will.newton@linaro.org>
* linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
out regs.
---
gdb/gdbserver/linux-aarch64-low.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/gdbserver/linux-aarch64-low.c b/gdb/gdbserver/linux-aarch64-low.c
index e37f602..93246b3 100644
--- a/gdb/gdbserver/linux-aarch64-low.c
+++ b/gdb/gdbserver/linux-aarch64-low.c
@@ -600,6 +600,7 @@ aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state,
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;
--
1.8.1.4