/* The raw register cache. Each raw (or hard) register is supplied
by the target interface. The raw cache should not contain
redundant information - if the PC is constructed from two
- registers then those regigisters and not the PC lives in the raw
+ registers then those registers and not the PC lives in the raw
cache. */
int nr_raw_registers;
long sizeof_raw_registers;
user). Therefore all registers must be written back to the
target when appropriate. */
-/* REGISTERS contains the cached register values (in target byte order). */
-
-char *deprecated_registers;
-
-/* DEPRECATED_REGISTER_VALID is 0 if the register needs to be fetched,
- 1 if it has been fetched, and
- -1 if the register value was not available.
-
- "Not available" indicates that the target is not not able to supply
- the register at this state. The register may become available at a
- later time (after the next resume). This often occures when GDB is
- manipulating a target that contains only a snapshot of the entire
- system being debugged - some of the registers in such a system may
- not have been saved. */
-
-signed char *deprecated_register_valid;
-
/* The thread/process associated with the current set of registers. */
static ptid_t registers_ptid;
int
register_cached (int regnum)
{
- return deprecated_register_valid[regnum];
+ return current_regcache->register_valid_p[regnum];
}
/* Record that REGNUM's value is cached if STATE is >0, uncached but
if (REGISTER_NAME (regnum) != NULL && *REGISTER_NAME (regnum) != '\0')
/* Force the cache to fetch the entire register. */
deprecated_read_register_gen (regnum, reg_buf);
- else
- /* Legacy note: even though this register is ``invalid'' we
- still need to return something. It would appear that some
- code relies on apparent gaps in the register array also
- being returned. */
- /* FIXME: cagney/2001-08-18: This is just silly. It defeats
- the entire register read/write flow of control. Must
- resist temptation to return 0xdeadbeef. */
- memcpy (reg_buf, &deprecated_registers[reg_start], reg_len);
/* Legacy note: This function, for some reason, allows a NULL
input buffer. If the buffer is NULL, the registers are still
Update it from the target before scribbling on it. */
deprecated_read_register_gen (regnum, regbuf);
- memcpy (&deprecated_registers[overlapstart],
- myaddr + (overlapstart - myregstart),
- overlapend - overlapstart);
-
target_store_registers (regnum);
}
}
pc_val = ADDR_BITS_REMOVE (raw_val);
}
else
- internal_error (__FILE__, __LINE__, "read_pc_pid: Unable to find PC");
+ internal_error (__FILE__, __LINE__, _("read_pc_pid: Unable to find PC"));
inferior_ptid = saved_inferior_ptid;
return pc_val;
write_register_pid (PC_REGNUM, pc, ptid);
else
internal_error (__FILE__, __LINE__,
- "generic_target_write_pc");
+ _("generic_target_write_pc"));
}
void
/* Try SP_REGNUM last: this makes all sorts of [wrong] assumptions
about the architecture so put it at the end. */
return read_register (SP_REGNUM);
- internal_error (__FILE__, __LINE__, "read_sp: Unable to find SP");
+ internal_error (__FILE__, __LINE__, _("read_sp: Unable to find SP"));
}
static void
/* Force-flush the register cache. */
registers_changed ();
if (from_tty)
- printf_filtered ("Register cache flushed.\n");
+ printf_filtered (_("Register cache flushed.\n"));
}
static void
{
current_regcache = regcache_xmalloc (current_gdbarch);
current_regcache->readonly_p = 0;
- deprecated_registers = deprecated_grub_regcache_for_registers (current_regcache);
- deprecated_register_valid = current_regcache->register_valid_p;
}
static void
fprintf_unfiltered (file, "%02x", buf[i]);
break;
default:
- internal_error (__FILE__, __LINE__, "Bad switch");
+ internal_error (__FILE__, __LINE__, _("Bad switch"));
}
}
{
struct ui_file *file = gdb_fopen (args, "w");
if (file == NULL)
- perror_with_name ("maintenance print architecture");
+ perror_with_name (_("maintenance print architecture"));
regcache_dump (current_regcache, file, what_to_dump);
ui_file_delete (file);
}
{
regcache_descr_handle = gdbarch_data_register_post_init (init_regcache_descr);
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);
observer_attach_target_changed (regcache_observer_target_changed);
add_com ("flushregs", class_maintenance, reg_flush_command,
- "Force gdb to flush its register cache (maintainer command)");
+ _("Force gdb to flush its register cache (maintainer command)"));
/* Initialize the thread/process associated with the current set of
registers. For now, -1 is special, and means `no current process'. */
registers_ptid = pid_to_ptid (-1);
- add_cmd ("registers", class_maintenance,
- maintenance_print_registers,
- "Print the internal register configuration.\
-Takes an optional file parameter.",
- &maintenanceprintlist);
+ add_cmd ("registers", class_maintenance, maintenance_print_registers, _("\
+Print the internal register configuration.\n\
+Takes an optional file parameter."), &maintenanceprintlist);
add_cmd ("raw-registers", class_maintenance,
- maintenance_print_raw_registers,
- "Print the internal register configuration including raw values.\
-Takes an optional file parameter.",
- &maintenanceprintlist);
+ maintenance_print_raw_registers, _("\
+Print the internal register configuration including raw values.\n\
+Takes an optional file parameter."), &maintenanceprintlist);
add_cmd ("cooked-registers", class_maintenance,
- maintenance_print_cooked_registers,
- "Print the internal register configuration including cooked values.\
-Takes an optional file parameter.",
- &maintenanceprintlist);
+ maintenance_print_cooked_registers, _("\
+Print the internal register configuration including cooked values.\n\
+Takes an optional file parameter."), &maintenanceprintlist);
add_cmd ("register-groups", class_maintenance,
- maintenance_print_register_groups,
- "Print the internal register configuration including each register's group.\
-Takes an optional file parameter.",
+ maintenance_print_register_groups, _("\
+Print the internal register configuration including each register's group.\n\
+Takes an optional file parameter."),
&maintenanceprintlist);
}