Call cooked_read in ppu2spu_prev_register
authorYao Qi <yao.qi@linaro.org>
Thu, 18 Jan 2018 12:21:01 +0000 (12:21 +0000)
committerYao Qi <yao.qi@linaro.org>
Thu, 18 Jan 2018 12:21:01 +0000 (12:21 +0000)
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.

gdb/ChangeLog
gdb/ppc-linux-tdep.c

index 79f00759659ee0f3d25492ae8e43d8a5fe3abedd..926ee207fa64b198a88f4462cd8ce3e5548757cc 100644 (file)
@@ -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"
index 286c02a26d9a62111f8aa3fd229d91d3d1c3834f..bbe9e894eb356c7ff58d1c929f09ea3498e05d5a 100644 (file)
@@ -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);
 }
 
This page took 0.026725 seconds and 4 git commands to generate.