* [pushed] Initialize res in get_next_pcs_read_memory_unsigned_integer
@ 2016-05-05 8:03 Yao Qi
0 siblings, 0 replies; only message in thread
From: Yao Qi @ 2016-05-05 8:03 UTC (permalink / raw)
To: gdb-patches
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.
---
gdb/gdbserver/ChangeLog | 5 +++++
gdb/gdbserver/linux-arm-low.c | 1 +
2 files changed, 6 insertions(+)
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 70cd4b0..a43f1e1 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,10 @@
2016-05-05 Yao Qi <yao.qi@linaro.org>
+ * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
+ Initialize res to zero.
+
+2016-05-05 Yao Qi <yao.qi@linaro.org>
+
* linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
to uint32_t.
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;
}
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-05 8:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-05 8:03 [pushed] Initialize res in get_next_pcs_read_memory_unsigned_integer Yao Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).