Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Subject: PATCH: Fix mips-linux native
Date: Tue, 29 Oct 2002 20:13:00 -0000	[thread overview]
Message-ID: <20021030041353.GA32309@nevyn.them.org> (raw)

Scratch one off my TODO list.  Should this be taken care of at a higher
level?  And if read_register_bytes is at the appropriate level to handle it,
then there's a similar check missing in write_register_bytes. 
read_register_bytes won't read from a register with no REGISTER_NAME, but
write_register_bytes will happily write them anyway.

Committed to get my port moving again.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2002-10-29  Daniel Jacobowitz  <drow@mvista.com>

	* mips-linux-nat.c (mips_linux_cannot_fetch_register): Don't fetch
	registers without a name.
	(mips_linux_cannot_store_register): Don't store registers without
	a name.

Index: mips-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-linux-nat.c,v
retrieving revision 1.3
diff -u -p -r1.3 mips-linux-nat.c
--- mips-linux-nat.c	17 Sep 2002 23:26:01 -0000	1.3
+++ mips-linux-nat.c	30 Oct 2002 04:07:15 -0000
@@ -29,6 +29,8 @@
 int
 mips_linux_cannot_fetch_register (int regno)
 {
+  if (REGISTER_NAME (regno)[0] == 0)
+    return 1;
   if (regno == PS_REGNUM)
     return 1;
   else if (regno == ZERO_REGNUM)
@@ -40,6 +42,8 @@ mips_linux_cannot_fetch_register (int re
 int
 mips_linux_cannot_store_register (int regno)
 {
+  if (REGISTER_NAME (regno)[0] == 0)
+    return 1;
   if (regno == PS_REGNUM)
     return 1;
   else if (regno == ZERO_REGNUM)


             reply	other threads:[~2002-10-30  4:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-29 20:13 Daniel Jacobowitz [this message]
2002-10-31 11:52 ` Andrew Cagney

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=20021030041353.GA32309@nevyn.them.org \
    --to=drow@mvista.com \
    --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