2004-10-30 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Sat, 30 Oct 2004 15:55:36 +0000 (15:55 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sat, 30 Oct 2004 15:55:36 +0000 (15:55 +0000)
* mips-tdep.c (read_signed_register): Use
regcache_cooked_read_signed.

gdb/ChangeLog
gdb/mips-tdep.c

index efb623fe91bf6c22876e71300b4960e60016cdcd..b5431b2480622450a67f62effa6ff3440524ae76 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-30  Andrew Cagney  <cagney@gnu.org>
+
+       * mips-tdep.c (read_signed_register): Use
+       regcache_cooked_read_signed.
+
 2004-10-30  Mark Kettenis  <kettenis@gnu.org>
 
        * mipsread.c: Cleanup coding style.
index b987a2f046e20d31e88d718a4685f4f174599a4e..70a198b0bc1c7561d19f998ae16388f1b08e2e26 100644 (file)
@@ -222,10 +222,9 @@ unmake_mips16_addr (CORE_ADDR addr)
 static LONGEST
 read_signed_register (int regnum)
 {
-  void *buf = alloca (register_size (current_gdbarch, regnum));
-  deprecated_read_register_gen (regnum, buf);
-  return (extract_signed_integer
-         (buf, register_size (current_gdbarch, regnum)));
+  LONGEST val;
+  regcache_cooked_read_signed (current_regcache, regnum, &val);
+  return val;
 }
 
 static LONGEST