This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Call cooked_read in ppu2spu_prev_register


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d679c21a43852305c5eeae957854f6e13d6f884c

commit d679c21a43852305c5eeae957854f6e13d6f884c
Author: Yao Qi <yao.qi@linaro.org>
Date:   Thu Jan 18 12:21:01 2018 +0000

    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.

Diff:
---
 gdb/ChangeLog        | 4 ++++
 gdb/ppc-linux-tdep.c | 6 +-----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 79f0075..926ee20 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2018-01-18  Yao Qi  <yao.qi@linaro.org>
+
+	* ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
+
 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
 
 	* compile/compile.c (compile_to_object): Convert "triplet_rx"
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);
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]