* x86-64-tdep.h: Tewak comment.
[deliverable/binutils-gdb.git] / gdb / regcache.c
index 62c0de516f0fbd886299f4c50c2e9483d011c9dc..e479954296e06bedefc9b53e3387d9028d32b58c 100644 (file)
@@ -1,7 +1,7 @@
 /* Cache and manage the values of registers for GDB, the GNU debugger.
 
    Copyright 1986, 1987, 1989, 1991, 1994, 1995, 1996, 1998, 2000,
-   2001, 2002 Free Software Foundation, Inc.
+   2001, 2002, 2004 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -459,7 +459,7 @@ regcache_cpy_no_passthrough (struct regcache *dst, struct regcache *src)
   gdb_assert (src->descr->gdbarch == dst->descr->gdbarch);
   /* NOTE: cagney/2002-05-17: Don't let the caller do a no-passthrough
      move of data into the current_regcache().  Doing this would be
-     silly - it would mean that valid_p would be completly invalid.  */
+     silly - it would mean that valid_p would be completely invalid.  */
   gdb_assert (dst != current_regcache);
   memcpy (dst->registers, src->registers, dst->descr->sizeof_raw_registers);
   memcpy (dst->register_valid_p, src->register_valid_p,
@@ -1351,15 +1351,11 @@ read_pc (void)
 void
 generic_target_write_pc (CORE_ADDR pc, ptid_t ptid)
 {
-#ifdef PC_REGNUM
   if (PC_REGNUM >= 0)
     write_register_pid (PC_REGNUM, pc, ptid);
-  if (DEPRECATED_NPC_REGNUM >= 0)
-    write_register_pid (DEPRECATED_NPC_REGNUM, pc + 4, ptid);
-#else
-  internal_error (__FILE__, __LINE__,
-                 "generic_target_write_pc");
-#endif
+  else
+    internal_error (__FILE__, __LINE__,
+                   "generic_target_write_pc");
 }
 
 void
@@ -1711,10 +1707,10 @@ void
 _initialize_regcache (void)
 {
   regcache_descr_handle = register_gdbarch_data (init_regcache_descr);
-  REGISTER_GDBARCH_SWAP (current_regcache);
-  register_gdbarch_swap (&deprecated_registers, sizeof (deprecated_registers), NULL);
-  register_gdbarch_swap (&deprecated_register_valid, sizeof (deprecated_register_valid), NULL);
-  register_gdbarch_swap (NULL, 0, build_regcache);
+  DEPRECATED_REGISTER_GDBARCH_SWAP (current_regcache);
+  DEPRECATED_REGISTER_GDBARCH_SWAP (deprecated_registers);
+  DEPRECATED_REGISTER_GDBARCH_SWAP (deprecated_register_valid);
+  deprecated_register_gdbarch_swap (NULL, 0, build_regcache);
 
   add_com ("flushregs", class_maintenance, reg_flush_command,
           "Force gdb to flush its register cache (maintainer command)");
This page took 0.025549 seconds and 4 git commands to generate.