Change register_changed_p returns bool
authorYao Qi <yao.qi@linaro.org>
Fri, 24 Nov 2017 10:47:27 +0000 (10:47 +0000)
committerYao Qi <yao.qi@linaro.org>
Fri, 24 Nov 2017 10:47:27 +0000 (10:47 +0000)
commit62ad7ce71b243df3e8d7d4f8b8560a7316233a9e
tree1c9eb8b15cec7b79fdf40e67632131d13a543898
parent506fe5f4996738f25b7c26f126a84b231429ba95
Change register_changed_p returns bool

register_changed_p actually returns bool, but return type is still int.
This patch changes the return type to bool.  The caller of
register_changed_p also checked whether the return value can be negative,
which is not needed now.  Such check was added in fb40c2090 in 2000,
at that moment, register_changed_p returns -1 when
read_relative_register_raw_bytes fails.  I can tell from its name that
it reads register contents, but we don't have this function called inside
register_changed_p, and the regcache is read-only.

gdb:

2017-11-24  Yao Qi  <yao.qi@linaro.org>

* mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
local 'changed'.  Remove error.
(register_changed_p): Change return type to bool.
gdb/ChangeLog
gdb/mi/mi-main.c