Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: gdb-patches@sources.redhat.com
Subject: [commit] Eliminate a deprecated_read_register_gen call
Date: Sat, 30 Oct 2004 15:57:00 -0000	[thread overview]
Message-ID: <4183ABB3.7080104@gnu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 24 bytes --]

FYI,

Committed,
Andrew

[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 823 bytes --]

2004-10-30  Andrew Cagney  <cagney@gnu.org>

	* mips-tdep.c (read_signed_register): Use
	regcache_cooked_read_signed.

Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.339
diff -p -u -r1.339 mips-tdep.c
--- mips-tdep.c	30 Oct 2004 14:31:19 -0000	1.339
+++ mips-tdep.c	30 Oct 2004 15:54:43 -0000
@@ -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

                 reply	other threads:[~2004-10-30 15:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4183ABB3.7080104@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox