int
-legacy_register_sim_regno (int regnum)
+legacy_register_sim_regno (struct gdbarch *gdbarch, int regnum)
{
/* Only makes sense to supply raw registers. */
- gdb_assert (regnum >= 0 && regnum < gdbarch_num_regs (current_gdbarch));
+ gdb_assert (regnum >= 0 && regnum < gdbarch_num_regs (gdbarch));
/* NOTE: cagney/2002-05-13: The old code did it this way and it is
suspected that some GDB/SIM combinations may rely on this
behavour. The default should be one2one_register_sim_regno
(below). */
- if (gdbarch_register_name (current_gdbarch, regnum) != NULL
- && gdbarch_register_name (current_gdbarch, regnum)[0] != '\0')
+ if (gdbarch_register_name (gdbarch, regnum) != NULL
+ && gdbarch_register_name (gdbarch, regnum)[0] != '\0')
return regnum;
else
return LEGACY_SIM_REGNO_IGNORE;
}
int
-cannot_register_not (int regnum)
+cannot_register_not (struct gdbarch *gdbarch, int regnum)
{
return 0;
}
raw. */
void
-legacy_virtual_frame_pointer (CORE_ADDR pc,
+legacy_virtual_frame_pointer (struct gdbarch *gdbarch,
+ CORE_ADDR pc,
int *frame_regnum,
LONGEST *frame_offset)
{
register and an offset can determine this. I think it should
instead generate a byte code expression as that would work better
with things like Dwarf2's CFI. */
- if (gdbarch_deprecated_fp_regnum (current_gdbarch) >= 0
- && gdbarch_deprecated_fp_regnum (current_gdbarch)
- < gdbarch_num_regs (current_gdbarch))
- *frame_regnum = gdbarch_deprecated_fp_regnum (current_gdbarch);
- else if (gdbarch_sp_regnum (current_gdbarch) >= 0
- && gdbarch_sp_regnum (current_gdbarch)
- < gdbarch_num_regs (current_gdbarch))
- *frame_regnum = gdbarch_sp_regnum (current_gdbarch);
+ if (gdbarch_deprecated_fp_regnum (gdbarch) >= 0
+ && gdbarch_deprecated_fp_regnum (gdbarch)
+ < gdbarch_num_regs (gdbarch))
+ *frame_regnum = gdbarch_deprecated_fp_regnum (gdbarch);
+ else if (gdbarch_sp_regnum (gdbarch) >= 0
+ && gdbarch_sp_regnum (gdbarch)
+ < gdbarch_num_regs (gdbarch))
+ *frame_regnum = gdbarch_sp_regnum (gdbarch);
else
/* Should this be an internal error? I guess so, it is reflecting
an architectural limitation in the current design. */
\f
int
-generic_convert_register_p (int regnum, struct type *type)
+generic_convert_register_p (struct gdbarch *gdbarch, int regnum,
+ struct type *type)
{
return 0;
}