* gdbarch.h: Regenerated.
* arch-utils.c (generic_register_size): Call register_type.
* ia64-tdep.c (ia64_extract_return_value): Likewise.
* m32c-tdep.c (check_for_saved): Likewise.
* mips-tdep.c (mips_print_register, print_gp_register_row)
(mips_print_registers_info): Likewise.
* sh-tdep.c (sh_pseudo_register_read, sh_pseudo_register_write):
Likewise.
* sh64-tdep.c (sh64_pseudo_register_read, sh64_pseudo_register_write)
(sh64_do_register, sh64_print_register)
(sh64_media_print_registers_info): Likewise.
* tui/tui-regs.c (tui_register_format): Likewise.
2007-01-21 Daniel Jacobowitz <dan@codesourcery.com>
+ * gdbarch.sh (register_type): Update comment.
+ * gdbarch.h: Regenerated.
+ * arch-utils.c (generic_register_size): Call register_type.
+ * ia64-tdep.c (ia64_extract_return_value): Likewise.
+ * m32c-tdep.c (check_for_saved): Likewise.
+ * mips-tdep.c (mips_print_register, print_gp_register_row)
+ (mips_print_registers_info): Likewise.
+ * sh-tdep.c (sh_pseudo_register_read, sh_pseudo_register_write):
+ Likewise.
+ * sh64-tdep.c (sh64_pseudo_register_read, sh64_pseudo_register_write)
+ (sh64_do_register, sh64_print_register)
+ (sh64_media_print_registers_info): Likewise.
+ * tui/tui-regs.c (tui_register_format): Likewise.
+
+2007-01-21 Daniel Jacobowitz <dan@codesourcery.com>
+
* objfiles.h (ALL_PRIMARY_SYMTABS): Define.
* ada-lang.c (symtab_for_sym, ada_lookup_symbol_list)
generic_register_size (int regnum)
{
gdb_assert (regnum >= 0 && regnum < NUM_REGS + NUM_PSEUDO_REGS);
- return TYPE_LENGTH (gdbarch_register_type (current_gdbarch, regnum));
+ return TYPE_LENGTH (register_type (current_gdbarch, regnum));
}
/* Assume all registers are adjacent. */
#define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr))
#endif
-/* REGISTER_TYPE is a direct replacement for DEPRECATED_REGISTER_VIRTUAL_TYPE. */
+/* Return the type of a register specified by the architecture. Only
+ the register cache should call this function directly; others should
+ use "register_type". */
extern int gdbarch_register_type_p (struct gdbarch *gdbarch);
f:=:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr::no_op_reg_to_regnum::0
f:=:const char *:register_name:int regnr:regnr
-# REGISTER_TYPE is a direct replacement for DEPRECATED_REGISTER_VIRTUAL_TYPE.
+# Return the type of a register specified by the architecture. Only
+# the register cache should call this function directly; others should
+# use "register_type".
M::struct type *:register_type:int reg_nr:reg_nr
# If the value returned by DEPRECATED_REGISTER_BYTE agrees with the
# register offsets computed using just REGISTER_TYPE, this can be
ULONGEST val;
int offset = 0;
int regnum = IA64_GR8_REGNUM;
- int reglen = TYPE_LENGTH (ia64_register_type (NULL, IA64_GR8_REGNUM));
+ int reglen = TYPE_LENGTH (register_type (get_regcache_arch (regcache),
+ IA64_GR8_REGNUM));
int n = TYPE_LENGTH (type) / reglen;
int m = TYPE_LENGTH (type) % reglen;
if (value.reg == tdep->pc->num)
saved_size = tdep->ret_addr_bytes;
- else if (gdbarch_register_type (arch, value.reg)
+ else if (register_type (arch, value.reg)
== tdep->data_addr_reg_type)
saved_size = tdep->push_addr_bytes;
gdb_byte raw_buffer[MAX_REGISTER_SIZE];
int offset;
- if (TYPE_CODE (gdbarch_register_type (gdbarch, regnum)) == TYPE_CODE_FLT)
+ if (TYPE_CODE (register_type (gdbarch, regnum)) == TYPE_CODE_FLT)
{
mips_print_fp_register (file, frame, regnum);
return;
offset = 0;
print_scalar_formatted (raw_buffer + offset,
- gdbarch_register_type (gdbarch, regnum), 'x', 0,
+ register_type (gdbarch, regnum), 'x', 0,
file);
}
{
if (*REGISTER_NAME (regnum) == '\0')
continue; /* unused register */
- if (TYPE_CODE (gdbarch_register_type (gdbarch, regnum)) ==
+ if (TYPE_CODE (register_type (gdbarch, regnum)) ==
TYPE_CODE_FLT)
break; /* end the row: reached FP register */
if (col == 0)
{
if (*REGISTER_NAME (regnum) == '\0')
continue; /* unused register */
- if (TYPE_CODE (gdbarch_register_type (gdbarch, regnum)) ==
+ if (TYPE_CODE (register_type (gdbarch, regnum)) ==
TYPE_CODE_FLT)
break; /* end row: reached FP register */
/* OK: get the data in raw format. */
regnum = NUM_REGS;
while (regnum < NUM_REGS + NUM_PSEUDO_REGS)
{
- if (TYPE_CODE (gdbarch_register_type (gdbarch, regnum)) ==
+ if (TYPE_CODE (register_type (gdbarch, regnum)) ==
TYPE_CODE_FLT)
{
if (all) /* true for "INFO ALL-REGISTERS" command */
base_regnum) * portion));
/* We must pay attention to the endiannes. */
sh_register_convert_to_virtual (reg_nr,
- gdbarch_register_type (gdbarch, reg_nr),
+ register_type (gdbarch, reg_nr),
temp_buffer, buffer);
}
else if (reg_nr >= FV0_REGNUM && reg_nr <= FV_LAST_REGNUM)
base_regnum = dr_reg_base_num (reg_nr);
/* We must pay attention to the endiannes. */
- sh_register_convert_to_raw (gdbarch_register_type (gdbarch, reg_nr),
+ sh_register_convert_to_raw (register_type (gdbarch, reg_nr),
reg_nr, buffer, temp_buffer);
/* Write the real regs for which this one is an alias. */
/* We must pay attention to the endianness. */
sh64_register_convert_to_virtual (reg_nr,
- gdbarch_register_type (gdbarch,
- reg_nr),
+ register_type (gdbarch, reg_nr),
temp_buffer, buffer);
}
/* We must pay attention to the endianness. */
sh64_register_convert_to_virtual (reg_nr,
- gdbarch_register_type (gdbarch,
- reg_nr),
+ register_type (gdbarch, reg_nr),
temp_buffer, buffer);
}
{
base_regnum = sh64_dr_reg_base_num (reg_nr);
/* We must pay attention to the endianness. */
- sh64_register_convert_to_raw (gdbarch_register_type (gdbarch, reg_nr),
+ sh64_register_convert_to_raw (register_type (gdbarch, reg_nr),
reg_nr,
buffer, temp_buffer);
for (portion = 0; portion < 2; portion++)
{
/* We must pay attention to the endianness. */
- sh64_register_convert_to_raw (gdbarch_register_type (gdbarch,
- reg_nr),
+ sh64_register_convert_to_raw (register_type (gdbarch, reg_nr),
reg_nr,
buffer, temp_buffer);
if (!frame_register_read (frame, regnum, raw_buffer))
fprintf_filtered (file, "*value not available*\n");
- val_print (gdbarch_register_type (gdbarch, regnum), raw_buffer, 0, 0,
+ val_print (register_type (gdbarch, regnum), raw_buffer, 0, 0,
file, 'x', 1, 0, Val_pretty_default);
fprintf_filtered (file, "\t");
- val_print (gdbarch_register_type (gdbarch, regnum), raw_buffer, 0, 0,
+ val_print (register_type (gdbarch, regnum), raw_buffer, 0, 0,
file, 0, 1, 0, Val_pretty_default);
fprintf_filtered (file, "\n");
}
else if (regnum >= 0 && regnum < NUM_REGS)
{
- if (TYPE_CODE (gdbarch_register_type (gdbarch, regnum)) == TYPE_CODE_FLT)
+ if (TYPE_CODE (register_type (gdbarch, regnum)) == TYPE_CODE_FLT)
sh64_do_fp_register (gdbarch, file, frame, regnum); /* FP regs */
else
sh64_do_register (gdbarch, file, frame, regnum);
continue;
}
- if (TYPE_CODE (gdbarch_register_type (gdbarch, regnum))
+ if (TYPE_CODE (register_type (gdbarch, regnum))
== TYPE_CODE_FLT)
{
if (fpregs)
struct cleanup *cleanups;
char *p, *s;
int pos;
- struct type *type = gdbarch_register_type (gdbarch, regnum);
+ struct type *type = register_type (gdbarch, regnum);
name = gdbarch_register_name (gdbarch, regnum);
if (name == 0)