bytes, as the representation of integers in floating point
registers is different. */
-static int
+static bool
alpha_convert_register_p (struct gdbarch *gdbarch, int regno,
struct type *type)
{
return format;
}
\f
-int
+bool
generic_convert_register_p (struct gdbarch *gdbarch, int regnum,
struct type *type)
{
- return 0;
+ return false;
}
int
const frame_info_ptr &frame);
/* By default, registers are not convertible. */
-extern int generic_convert_register_p (struct gdbarch *gdbarch, int regnum,
- struct type *type);
+extern bool generic_convert_register_p (struct gdbarch *gdbarch, int regnum,
+ struct type *type);
extern int generic_instruction_nullified (struct gdbarch *gdbarch,
struct regcache *regcache);
gdbarch->get_longjmp_target = get_longjmp_target;
}
-int
+bool
gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
{
gdb_assert (gdbarch != NULL);
extern bool gdbarch_get_longjmp_target (struct gdbarch *gdbarch, const frame_info_ptr &frame, CORE_ADDR *pc);
extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype *get_longjmp_target);
-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);
+typedef bool (gdbarch_convert_register_p_ftype) (struct gdbarch *gdbarch, int regnum, struct type *type);
+extern bool 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);
typedef int (gdbarch_register_to_value_ftype) (const frame_info_ptr &frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep);
)
Method(
- type="int",
+ type="bool",
name="convert_register_p",
params=[("int", "regnum"), ("struct type *", "type")],
predefault="generic_convert_register_p",
return -1;
}
-/* Return nonzero if a value of type TYPE stored in register REGNUM
+/* Return true if a value of type TYPE stored in register REGNUM
needs any special handling. */
-static int
+static bool
i386_convert_register_p (struct gdbarch *gdbarch,
int regnum, struct type *type)
{
}
if (last_regnum != -1)
- return 1;
+ return true;
}
return i387_convert_register_p (gdbarch, regnum, type);
}
\f
-/* Return nonzero if a value of type TYPE stored in register REGNUM
+/* Return true if a value of type TYPE stored in register REGNUM
needs any special handling. */
-int
+bool
i387_convert_register_p (struct gdbarch *gdbarch, int regnum,
struct type *type)
{
accessing them in their hardware type or TYPE is not float. */
if (type == i387_ext_type (gdbarch)
|| type->code () != TYPE_CODE_FLT)
- return 0;
+ return false;
else
- return 1;
+ return true;
}
- return 0;
+ return false;
}
/* Read a value of type TYPE from register REGNUM in frame FRAME, and
const frame_info_ptr &frame,
const char *args);
-/* Return nonzero if a value of type TYPE stored in register REGNUM
+/* Return true if a value of type TYPE stored in register REGNUM
needs any special handling. */
-extern int i387_convert_register_p (struct gdbarch *gdbarch, int regnum,
- struct type *type);
+extern bool 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. */
/* The ia64 needs to convert between various ieee floating-point formats
and the special ia64 floating point register format. */
-static int
+static bool
ia64_convert_register_p (struct gdbarch *gdbarch, int regno, struct type *type)
{
return (regno >= IA64_FR0_REGNUM && regno <= IA64_FR127_REGNUM
return m68k_register_names[regnum];
}
\f
-/* Return nonzero if a value of type TYPE stored in register REGNUM
+/* Return true if a value of type TYPE stored in register REGNUM
needs any special handling. */
-static int
+static bool
m68k_convert_register_p (struct gdbarch *gdbarch,
int regnum, struct type *type)
{
m68k_gdbarch_tdep *tdep = gdbarch_tdep<m68k_gdbarch_tdep> (gdbarch);
if (!tdep->fpregs_present)
- return 0;
+ return false;
return (regnum >= M68K_FP0_REGNUM && regnum <= M68K_FP0_REGNUM + 7
/* We only support floating-point values. */
&& type->code () == TYPE_CODE_FLT
return mips_regnum (gdbarch)->fp0 + 12;
}
-/* Return 1 if REGNUM refers to a floating-point general register, raw
- or cooked. Otherwise return 0. */
+/* Return true if REGNUM refers to a floating-point general register, raw
+ or cooked. Otherwise return false. */
-static int
+static bool
mips_float_register_p (struct gdbarch *gdbarch, int regnum)
{
int rawnum = regnum % gdbarch_num_regs (gdbarch);
value that is being transferred to or from a pair of floating point
registers each of which are (or are considered to be) only 4 bytes
wide. */
-static int
+static bool
mips_convert_register_float_case_p (struct gdbarch *gdbarch, int regnum,
struct type *type)
{
/* This predicate tests for the case of a value of less than 8
bytes in width that is being transferred to or from an 8 byte
general purpose register. */
-static int
+static bool
mips_convert_register_gpreg_case_p (struct gdbarch *gdbarch, int regnum,
struct type *type)
{
&& type->length () < 8);
}
-static int
+static bool
mips_convert_register_p (struct gdbarch *gdbarch,
int regnum, struct type *type)
{
/* The register format for RS/6000 floating point registers is always
double, we need a conversion if the memory format is float. */
-static int
+static bool
rs6000_convert_register_p (struct gdbarch *gdbarch, int regnum,
struct type *type)
{