This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Undeprecate GNU/Hurd
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. */