This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Fix mips-linux native


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]