From: Ulrich Weigand Date: Thu, 29 May 2008 11:53:12 +0000 (+0000) Subject: * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=76b233ddaa81d326e6fbaae572ac8ea4c233ee58;p=binutils-gdb.git * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer. --- diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 37d192aade1..7a7afcc61a1 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 84f9d374e92..c03b50a2cf1 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