/* 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.
for (i = 0; i < descr->nr_cooked_registers; i++)
{
/* FIXME: cagney/2001-12-04: This code shouldn't need to use
- DEPRECATED_REGISTER_BYTE(). Unfortunatly, legacy code likes
+ DEPRECATED_REGISTER_BYTE(). Unfortunately, legacy code likes
to lay the buffer out so that certain registers just happen
to overlap. Ulgh! New targets use gdbarch's register
read/write and entirely avoid this uglyness. */
descr->sizeof_cooked_registers = regend;
}
/* FIXME: cagney/2002-05-11: Shouldn't be including pseudo-registers
- in the register cache. Unfortunatly some architectures still
+ in the register cache. Unfortunately some architectures still
rely on this and the pseudo_register_write() method. */
descr->sizeof_raw_registers = descr->sizeof_cooked_registers;
}
}
/* FIXME: cagney/2002-05-22: Should only need to allocate space for
- the raw registers. Unfortunatly some code still accesses the
+ the raw registers. Unfortunately some code still accesses the
register array directly using the global registers[]. Until that
code has been purged, play safe and over allocating the register
buffer. Ulgh! */
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,
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
_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)");