diff options
author | Yao Qi <yao.qi@linaro.org> | 2016-02-10 16:40:52 +0000 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-02-10 16:40:52 +0000 |
commit | 9f6a71b4bfdad8fa2fe33e86f799fa0d362973dc (patch) | |
tree | 58ac23408f68e52e5571d8080cf43c756161c240 /ylwrap | |
parent | 550dc4e26630c9b9a2bb95cd51250762fc89fe16 (diff) | |
download | gdb-9f6a71b4bfdad8fa2fe33e86f799fa0d362973dc.zip gdb-9f6a71b4bfdad8fa2fe33e86f799fa0d362973dc.tar.gz gdb-9f6a71b4bfdad8fa2fe33e86f799fa0d362973dc.tar.bz2 |
Clear *VAL in regcache_raw_read_unsigned
We have function regcache_raw_read_unsigned defined in both GDB and
GDBserver, so that it is used in common like this,
ULONGEST value;
status = regcache_raw_read_unsigned (regcache, regnum, &value);
'value' is correctly set in GDB side, but may not be correctly set
in GDBserver, because &value is passed in regcache_raw_read_unsigned
but collect_register may only set part of the whole variable. In my
test, I see the top half of 'value' is garbage. This patch fixes this
problem by clearing *VAL before calling collect_register.
gdb/gdbserver:
2016-02-10 Yao Qi <yao.qi@linaro.org>
* regcache.c (regcache_raw_read_unsigned): Clear *VAL.
Diffstat (limited to 'ylwrap')
0 files changed, 0 insertions, 0 deletions