* ia64-tdep.c (ia64_convert_register_p): Likewise.
* i387-tdep.c (i387_convert_register_p): Likewise.
* i387-tdep.h (i387_convert_register_p): Likewise.
* alpha-tdep.c (alpha_convert_register_p): Likewise.
* gdbarch.{c,h}: Regenerate.
* rs6000-tdep.c (rs6000_convert_register_p): Add gdbarch as parameter.
Replace current_gdbarch by gdbarch.
* mips-tdep.c (mips_convert_register_p): Likewise.
* m68k-tdep.c (m68k_convert_register_p): Likewise.
* i386-tdep.c (i386_convert_register_p): Likewise.
+2007-11-09 Markus Deuling <deuling@de.ibm.com>
+
+ * gdbarch.sh (convert_register_p): Add gdbarch as parameter.
+ * ia64-tdep.c (ia64_convert_register_p): Likewise.
+ * i387-tdep.c (i387_convert_register_p): Likewise.
+ * i387-tdep.h (i387_convert_register_p): Likewise.
+ * alpha-tdep.c (alpha_convert_register_p): Likewise.
+ * gdbarch.{c,h}: Regenerate.
+
+ * rs6000-tdep.c (rs6000_convert_register_p): Add gdbarch as parameter.
+ Replace current_gdbarch by gdbarch.
+ * mips-tdep.c (mips_convert_register_p): Likewise.
+ * m68k-tdep.c (m68k_convert_register_p): Likewise.
+ * i386-tdep.c (i386_convert_register_p): Likewise.
+
2007-11-08 Aleksandar Ristovski <aristovski@qnx.com>
* gdb_string.h: Include <strings.h>.
registers is different. */
static int
-alpha_convert_register_p (int regno, struct type *type)
+alpha_convert_register_p (struct gdbarch *gdbarch, int regno, struct type *type)
{
return (regno >= ALPHA_FP0_REGNUM && regno < ALPHA_FP0_REGNUM + 31
&& TYPE_LENGTH (type) != 8);
0, /* cannot_store_register */
0, /* get_longjmp_target */
0, /* believe_pcc_promotion */
- 0, /* convert_register_p */
+ generic_convert_register_p, /* convert_register_p */
0, /* register_to_value */
0, /* value_to_register */
0, /* value_from_register */
gdb_assert (gdbarch->convert_register_p != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
- return gdbarch->convert_register_p (regnum, type);
+ return gdbarch->convert_register_p (gdbarch, regnum, type);
}
void
extern int gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch);
extern void set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, int believe_pcc_promotion);
-typedef int (gdbarch_convert_register_p_ftype) (int regnum, struct type *type);
+typedef int (gdbarch_convert_register_p_ftype) (struct gdbarch *gdbarch, int regnum, struct type *type);
extern int gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type);
extern void set_gdbarch_convert_register_p (struct gdbarch *gdbarch, gdbarch_convert_register_p_ftype *convert_register_p);
#
v:int:believe_pcc_promotion:::::::
#
-f:int:convert_register_p:int regnum, struct type *type:regnum, type:0:generic_convert_register_p::0
+m:int:convert_register_p:int regnum, struct type *type:regnum, type:0:generic_convert_register_p::0
f:void:register_to_value:struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf:frame, regnum, type, buf:0
f:void:value_to_register:struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf:frame, regnum, type, buf:0
# Construct a value representing the contents of register REGNUM in
needs any special handling. */
static int
-i386_convert_register_p (int regnum, struct type *type)
+i386_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
{
int len = TYPE_LENGTH (type);
return 1;
}
- return i387_convert_register_p (regnum, type);
+ return i387_convert_register_p (gdbarch, regnum, type);
}
/* Read a value of type TYPE from register REGNUM in frame FRAME, and
needs any special handling. */
int
-i387_convert_register_p (int regnum, struct type *type)
+i387_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
{
if (i386_fp_regnum_p (regnum))
{
/* Return nonzero if a value of type TYPE stored in register REGNUM
needs any special handling. */
-extern int i387_convert_register_p (int regnum, struct type *type);
+extern int i387_convert_register_p (struct gdbarch *gdbarch, int regnum,
+ struct type *type);
/* Read a value of type TYPE from register REGNUM in frame FRAME, and
return its contents in TO. */
and the special ia64 floating point register format. */
static int
-ia64_convert_register_p (int regno, struct type *type)
+ia64_convert_register_p (struct gdbarch *gdbarch, int regno, struct type *type)
{
return (regno >= IA64_FR0_REGNUM && regno <= IA64_FR127_REGNUM
&& type != builtin_type_ia64_ext);
needs any special handling. */
static int
-m68k_convert_register_p (int regnum, struct type *type)
+m68k_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
{
- if (!gdbarch_tdep (current_gdbarch)->fpregs_present)
+ if (!gdbarch_tdep (gdbarch)->fpregs_present)
return 0;
return (regnum >= M68K_FP0_REGNUM && regnum <= M68K_FP0_REGNUM + 7
&& type != builtin_type_m68881_ext);
/* Convert to/from a register and the corresponding memory value. */
static int
-mips_convert_register_p (int regnum, struct type *type)
-{
- return (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG
- && register_size (current_gdbarch, regnum) == 4
- && (regnum % gdbarch_num_regs (current_gdbarch))
- >= mips_regnum (current_gdbarch)->fp0
- && (regnum % gdbarch_num_regs (current_gdbarch))
- < mips_regnum (current_gdbarch)->fp0 + 32
+mips_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
+{
+ return (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG
+ && register_size (gdbarch, regnum) == 4
+ && (regnum % gdbarch_num_regs (gdbarch))
+ >= mips_regnum (gdbarch)->fp0
+ && (regnum % gdbarch_num_regs (gdbarch))
+ < mips_regnum (gdbarch)->fp0 + 32
&& TYPE_CODE (type) == TYPE_CODE_FLT && TYPE_LENGTH (type) == 8);
}
double, we need a conversion if the memory format is float. */
static int
-rs6000_convert_register_p (int regnum, struct type *type)
+rs6000_convert_register_p (struct gdbarch *gdbarch, int regnum,
+ struct type *type)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
return (tdep->ppc_fp0_regnum >= 0
&& regnum >= tdep->ppc_fp0_regnum