From 1d93fe1a610303f5104b506afbbb87b4c875b11a Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sat, 30 Oct 2004 15:55:36 +0000 Subject: [PATCH] 2004-10-30 Andrew Cagney * mips-tdep.c (read_signed_register): Use regcache_cooked_read_signed. --- gdb/ChangeLog | 5 +++++ gdb/mips-tdep.c | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index efb623fe91b..b5431b24806 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2004-10-30 Andrew Cagney + + * mips-tdep.c (read_signed_register): Use + regcache_cooked_read_signed. + 2004-10-30 Mark Kettenis * mipsread.c: Cleanup coding style. diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index b987a2f046e..70a198b0bc1 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -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 -- 2.30.2