mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-24 12:39:59 +00:00
* 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.
This commit is contained in:
parent
1130965767
commit
7b9ee6a806
@ -1,3 +1,19 @@
|
||||
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.
|
||||
|
@ -250,7 +250,7 @@ int
|
||||
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. */
|
||||
|
@ -469,7 +469,9 @@ extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register
|
||||
#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);
|
||||
|
||||
|
@ -455,7 +455,9 @@ f:=:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr::no_op_reg_to_regnum::0
|
||||
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
|
||||
|
@ -3034,7 +3034,8 @@ ia64_extract_return_value (struct type *type, struct regcache *regcache,
|
||||
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;
|
||||
|
||||
|
@ -1481,7 +1481,7 @@ check_for_saved (void *prologue_untyped, pv_t addr, CORE_ADDR size, pv_t value)
|
||||
|
||||
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;
|
||||
|
||||
|
@ -4031,7 +4031,7 @@ mips_print_register (struct ui_file *file, struct frame_info *frame,
|
||||
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;
|
||||
@ -4063,7 +4063,7 @@ mips_print_register (struct ui_file *file, struct frame_info *frame,
|
||||
offset = 0;
|
||||
|
||||
print_scalar_formatted (raw_buffer + offset,
|
||||
gdbarch_register_type (gdbarch, regnum), 'x', 0,
|
||||
register_type (gdbarch, regnum), 'x', 0,
|
||||
file);
|
||||
}
|
||||
|
||||
@ -4100,7 +4100,7 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame,
|
||||
{
|
||||
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)
|
||||
@ -4126,7 +4126,7 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame,
|
||||
{
|
||||
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. */
|
||||
@ -4178,7 +4178,7 @@ mips_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
|
||||
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 */
|
||||
|
@ -2004,7 +2004,7 @@ sh_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
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)
|
||||
@ -2044,7 +2044,7 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
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. */
|
||||
|
@ -1597,8 +1597,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
|
||||
/* 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);
|
||||
|
||||
}
|
||||
@ -1669,8 +1668,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
@ -1755,7 +1753,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
{
|
||||
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);
|
||||
|
||||
@ -1829,8 +1827,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
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);
|
||||
|
||||
@ -2084,10 +2081,10 @@ sh64_do_register (struct gdbarch *gdbarch, struct ui_file *file,
|
||||
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");
|
||||
}
|
||||
@ -2102,7 +2099,7 @@ sh64_print_register (struct gdbarch *gdbarch, struct ui_file *file,
|
||||
|
||||
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);
|
||||
@ -2139,7 +2136,7 @@ sh64_media_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (TYPE_CODE (gdbarch_register_type (gdbarch, regnum))
|
||||
if (TYPE_CODE (register_type (gdbarch, regnum))
|
||||
== TYPE_CODE_FLT)
|
||||
{
|
||||
if (fpregs)
|
||||
|
@ -654,7 +654,7 @@ tui_register_format (struct gdbarch *gdbarch, struct frame_info *frame,
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user