diff options
author | Yao Qi <yao.qi@linaro.org> | 2018-01-18 12:21:01 +0000 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2018-01-18 12:21:01 +0000 |
commit | d679c21a43852305c5eeae957854f6e13d6f884c (patch) | |
tree | 616c2b2e337d5b9fcd74b6c178b0cc7900979ba8 /gdb/ppc-linux-tdep.c | |
parent | 691d2e9af211ff8dd5fa8c96cb961b73a78394d7 (diff) | |
download | binutils-d679c21a43852305c5eeae957854f6e13d6f884c.zip binutils-d679c21a43852305c5eeae957854f6e13d6f884c.tar.gz binutils-d679c21a43852305c5eeae957854f6e13d6f884c.tar.bz2 |
Call cooked_read in ppu2spu_prev_register
The code in ppu2spu_prev_register is in fact regcache_cooked_read,
because spu doesn't have gdbarch method pseudo_register_read_value.
gdb:
2018-01-18 Yao Qi <yao.qi@linaro.org>
* ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
Diffstat (limited to 'gdb/ppc-linux-tdep.c')
-rw-r--r-- | gdb/ppc-linux-tdep.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 286c02a..bbe9e89 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -1269,11 +1269,7 @@ ppu2spu_prev_register (struct frame_info *this_frame, buf = (gdb_byte *) alloca (register_size (gdbarch, regnum)); - if (regnum < gdbarch_num_regs (gdbarch)) - regcache_raw_read (cache->regcache, regnum, buf); - else - gdbarch_pseudo_register_read (gdbarch, cache->regcache, regnum, buf); - + cache->regcache->cooked_read (regnum, buf); return frame_unwind_got_bytes (this_frame, regnum, buf); } |