Skip to content
Snippets Groups Projects
Commit 9e784964 authored by Yao Qi's avatar Yao Qi
Browse files

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.
parent cf2ebb6e
No related branches found
No related tags found
No related merge requests found
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> 2016-05-05 Yao Qi <yao.qi@linaro.org>
   
* linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
......
...@@ -262,6 +262,7 @@ get_next_pcs_read_memory_unsigned_integer (CORE_ADDR memaddr, ...@@ -262,6 +262,7 @@ get_next_pcs_read_memory_unsigned_integer (CORE_ADDR memaddr,
{ {
ULONGEST res; ULONGEST res;
res = 0;
(*the_target->read_memory) (memaddr, (unsigned char *) &res, len); (*the_target->read_memory) (memaddr, (unsigned char *) &res, len);
return res; return res;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment