Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PATCH: Fix mips-linux native
@ 2002-10-29 20:13 Daniel Jacobowitz
  2002-10-31 11:52 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Jacobowitz @ 2002-10-29 20:13 UTC (permalink / raw)
  To: gdb-patches

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)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: Fix mips-linux native
  2002-10-29 20:13 PATCH: Fix mips-linux native Daniel Jacobowitz
@ 2002-10-31 11:52 ` Andrew Cagney
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2002-10-31 11:52 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

> 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.

The underlying problem is going to be taken care of at a higher level. 
The regcache save/restore will only save/restore registers in the 
save/restore register group.

Andrew



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-31 19:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-29 20:13 PATCH: Fix mips-linux native Daniel Jacobowitz
2002-10-31 11:52 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox