From: Andrew Cagney Date: Sat, 30 Oct 2004 15:55:36 +0000 (+0000) Subject: 2004-10-30 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d93fe1a610303f5104b506afbbb87b4c875b11a;p=binutils-gdb.git 2004-10-30 Andrew Cagney * mips-tdep.c (read_signed_register): Use regcache_cooked_read_signed. --- 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