*/
/* Per-architecture object describing the layout of a register cache.
- Computed once when the architecture is created */
+ Computed once when the architecture is created. */
struct gdbarch_data *regcache_descr_handle;
/* Fill in a table of register types. */
descr->register_type
- = GDBARCH_OBSTACK_CALLOC (gdbarch, descr->nr_cooked_registers, struct type *);
+ = GDBARCH_OBSTACK_CALLOC (gdbarch, descr->nr_cooked_registers,
+ struct type *);
for (i = 0; i < descr->nr_cooked_registers; i++)
descr->register_type[i] = gdbarch_register_type (gdbarch, i);
gdb_assert (dst->readonly_p);
/* Clear the dest. */
memset (dst->registers, 0, dst->descr->sizeof_cooked_registers);
- memset (dst->register_valid_p, 0, dst->descr->sizeof_cooked_register_valid_p);
+ memset (dst->register_valid_p, 0,
+ dst->descr->sizeof_cooked_register_valid_p);
/* Copy over any registers (identified by their membership in the
save_reggroup) and mark them as valid. The full [0 .. gdbarch_num_regs +
gdbarch_num_pseudo_regs) range is checked since some architectures need
current_thread_ptid = null_ptid;
current_thread_arch = NULL;
- /* Need to forget about any frames we have cached, too. */
+ /* Need to forget about any frames we have cached, too. */
reinit_frame_cache ();
/* Force cleanup of any alloca areas if using C alloca instead of
return;
/* If we have a valid copy of the register, and new value == old
- value, then don't bother doing the actual store. */
+ value, then don't bother doing the actual store. */
if (regcache_valid_p (regcache, regnum)
&& (memcmp (register_buffer (regcache, regnum), buf,
regcache->descr->sizeof_register[regnum]) == 0))
/* Something to do? */
if (offset + len == 0)
return;
- /* Read (when needed) ... */
+ /* Read (when needed) ... */
if (in != NULL
|| offset > 0
|| offset + len < descr->sizeof_register[regnum])
gdb_assert (read != NULL);
read (regcache, regnum, reg);
}
- /* ... modify ... */
+ /* ... modify ... */
if (in != NULL)
memcpy (in, reg + offset, len);
if (out != NULL)
enum regcache_dump_what
{
- regcache_dump_none, regcache_dump_raw, regcache_dump_cooked, regcache_dump_groups
+ regcache_dump_none, regcache_dump_raw,
+ regcache_dump_cooked, regcache_dump_groups
};
static void
{
if (gdbarch_register_reggroup_p (gdbarch, regnum, group))
{
- fprintf_unfiltered (file, "%s%s", sep, reggroup_name (group));
+ fprintf_unfiltered (file,
+ "%s%s", sep, reggroup_name (group));
sep = ",";
}
}
void
_initialize_regcache (void)
{
- regcache_descr_handle = gdbarch_data_register_post_init (init_regcache_descr);
+ regcache_descr_handle
+ = gdbarch_data_register_post_init (init_regcache_descr);
observer_attach_target_changed (regcache_observer_target_changed);
observer_attach_thread_ptid_changed (regcache_thread_ptid_changed);
add_com ("flushregs", class_maintenance, reg_flush_command,
_("Force gdb to flush its register cache (maintainer command)"));
- add_cmd ("registers", class_maintenance, maintenance_print_registers, _("\
-Print the internal register configuration.\n\
-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.\n\
-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.\n\
-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.\n\
-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);
}