Don't call gdbarch_pseudo_register_read_value in jit.c
authorYao Qi <yao.qi@linaro.org>
Mon, 22 Jan 2018 11:02:48 +0000 (11:02 +0000)
committerYao Qi <yao.qi@linaro.org>
Mon, 22 Jan 2018 11:02:48 +0000 (11:02 +0000)
commit3f5a868b2277a3678f7eeb8fdf88935913b5918b
tree7eeeee8c91057e5e14f958e9f7e5bf112e1aec89
parentde4cb04a20782b817fc80b49bba83b43cf1cb85d
Don't call gdbarch_pseudo_register_read_value in jit.c

gdbarch_pseudo_register_read_value is not implemented in every gdbarch, so
the predicate gdbarch_pseudo_register_read_value_p is needed before
calling it.  However, there is no such guard in jit_frame_prev_register, I
am wondering how does jit work on the arch without having gdbarch method
pseudo_register_read_value.

The proper way to get register value is to call cooked_read, and then
create the value object from the buffer.

gdb:

2018-01-22  Yao Qi  <yao.qi@linaro.org>

* jit.c (jit_frame_prev_register): Call regcache::cooked_read
instead of gdbarch_pseudo_register_read_value.
gdb/ChangeLog
gdb/jit.c