aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-arm-low.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-05-05 09:00:56 +0100
committerYao Qi <yao.qi@linaro.org>2016-05-05 09:00:56 +0100
commit9e78496443ec1525ee94c54249779639b4cded0b (patch)
tree3ff11173bcd4b7798e070a8626c22bf91a033964 /gdb/gdbserver/linux-arm-low.c
parentcf2ebb6e0958c9193c7c65620cd7a8b990d8b316 (diff)
downloadgdb-9e78496443ec1525ee94c54249779639b4cded0b.zip
gdb-9e78496443ec1525ee94c54249779639b4cded0b.tar.gz
gdb-9e78496443ec1525ee94c54249779639b4cded0b.tar.bz2
Initialize res in get_next_pcs_read_memory_unsigned_integer
This patch initialize res to zero, otherwise, it may have some garbage bits after the *the_target->read_memory call. gdb/gdbserver: 2016-05-05 Yao Qi <yao.qi@linaro.org> * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Initialize res to zero.
Diffstat (limited to 'gdb/gdbserver/linux-arm-low.c')
-rw-r--r--gdb/gdbserver/linux-arm-low.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c
index 952ec26..2ffda87 100644
--- a/gdb/gdbserver/linux-arm-low.c
+++ b/gdb/gdbserver/linux-arm-low.c
@@ -262,6 +262,7 @@ get_next_pcs_read_memory_unsigned_integer (CORE_ADDR memaddr,
{
ULONGEST res;
+ res = 0;
(*the_target->read_memory) (memaddr, (unsigned char *) &res, len);
return res;
}