Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: cagney@gnu.org
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Undeprecate GNU/Hurd
Date: Sun, 08 Aug 2004 15:02:00 -0000	[thread overview]
Message-ID: <200408081502.i78F2m2Y000365@elgar.kettenis.dyndns.org> (raw)
In-Reply-To: <41163971.4070203@gnu.org> (message from Andrew Cagney on Sun, 08 Aug 2004 10:32:17 -0400)

   Date: Sun, 08 Aug 2004 10:32:17 -0400
   From: Andrew Cagney <cagney@gnu.org>

   > @@ -268,15 +266,15 @@ gnu_store_registers (int regno)
   >  	  proc_debug (thread, "storing all registers");
   >  
   >  	  for (i = 0; i < I386_NUM_GREGS; i++)
   > -	    if (deprecated_register_valid[i])
   > -	      fill (state, i);
   > +	    if (regcache_valid_p (regcache, i))
   > +	      regcache_raw_supply (regcache, i, REG_ADDR (state, i));
   >  	}
   >        else

   Should this, and a few others, be ``collect''?  Supplying an already 
   valid register doesn't seem logical :-)

Ouch.  Thanks for spotting this one.  Fixed by the attached patch.
There is one instance where regcache_raw_supply is correct in that
function.


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>
 
	* i386gnu-nat.c (gnu_store_registers): Use regcache_raw_collect
	instead of regcache_raw_supply when storing the registers.

Index: i386gnu-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386gnu-nat.c,v
retrieving revision 1.20
diff -u -p -r1.20 i386gnu-nat.c
--- i386gnu-nat.c 8 Aug 2004 12:50:37 -0000 1.20
+++ i386gnu-nat.c 8 Aug 2004 14:59:47 -0000
@@ -267,14 +267,14 @@ gnu_store_registers (int regno)
 
 	  for (i = 0; i < I386_NUM_GREGS; i++)
 	    if (regcache_valid_p (regcache, i))
-	      regcache_raw_supply (regcache, i, REG_ADDR (state, i));
+	      regcache_raw_collect (regcache, i, REG_ADDR (state, i));
 	}
       else
 	{
 	  proc_debug (thread, "storing register %s", REGISTER_NAME (regno));
 
 	  gdb_assert (regcache_valid_p (regcache, regno));
-	  regcache_raw_supply (regcache, regno, REG_ADDR (state, regno));
+	  regcache_craw_collect (regcache, regno, REG_ADDR (state, regno));
 	}
 
       /* Restore the T bit.  */




  reply	other threads:[~2004-08-08 15:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-08 14:17 Mark Kettenis
2004-08-08 14:32 ` Andrew Cagney
2004-08-08 15:02   ` Mark Kettenis [this message]
2004-08-08 15:18     ` 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=200408081502.i78F2m2Y000365@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=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