From 76b233ddaa81d326e6fbaae572ac8ea4c233ee58 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Thu, 29 May 2008 11:53:12 +0000 Subject: [PATCH] * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer. --- gdb/gdbserver/ChangeLog | 4 ++++ gdb/gdbserver/linux-ppc-low.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 37d192a..7a7afcc 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2008-05-29 Ulrich Weigand + + * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer. + 2008-05-09 Doug Evans * server.h (decode_search_memory_packet): Declare. diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c index 84f9d37..c03b50a 100644 --- a/gdb/gdbserver/linux-ppc-low.c +++ b/gdb/gdbserver/linux-ppc-low.c @@ -149,6 +149,9 @@ static void ppc_collect_ptrace_register (int regno, char *buf) { int size = register_size (regno); + + memset (buf, 0, sizeof (long)); + if (size < sizeof (long)) collect_register (regno, buf + sizeof (long) - size); else -- 2.7.4