/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
- Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+ 2008 Free Software Foundation, Inc.
This file is part of GDB.
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
-no_op_reg_to_regnum (int reg)
+no_op_reg_to_regnum (struct gdbarch *gdbarch, int reg)
{
return reg;
}
}
int
-cannot_register_not (int regnum)
+cannot_register_not (struct gdbarch *gdbarch, int regnum)
{
return 0;
}
\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;
}
struct gdbarch *
gdbarch_from_bfd (bfd *abfd)
{
- struct gdbarch *old_gdbarch = current_gdbarch;
- struct gdbarch *new_gdbarch;
struct gdbarch_info info;
/* If we call gdbarch_find_by_info without filling in info.abfd,