* 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.
This commit is contained in:
parent
ba3853d176
commit
0abe36f50d
|
@ -1,3 +1,18 @@
|
|||
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>.
|
||||
|
|
|
@ -198,7 +198,7 @@ alpha_sts (void *out, const void *in)
|
|||
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);
|
||||
|
|
|
@ -295,7 +295,7 @@ struct gdbarch startup_gdbarch =
|
|||
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 */
|
||||
|
@ -1922,7 +1922,7 @@ gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *ty
|
|||
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
|
||||
|
|
|
@ -319,7 +319,7 @@ extern void set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, gdbarch_get
|
|||
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);
|
||||
|
||||
|
|
|
@ -452,7 +452,7 @@ F:int:get_longjmp_target:struct frame_info *frame, CORE_ADDR *pc:frame, pc
|
|||
#
|
||||
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
|
||||
|
|
|
@ -1857,7 +1857,7 @@ i386_next_regnum (int regnum)
|
|||
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);
|
||||
|
||||
|
@ -1880,7 +1880,7 @@ i386_convert_register_p (int regnum, struct type *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
|
||||
|
|
|
@ -289,7 +289,7 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
|
|||
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))
|
||||
{
|
||||
|
|
|
@ -58,7 +58,8 @@ extern void i387_print_float_info (struct gdbarch *gdbarch,
|
|||
/* 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. */
|
||||
|
|
|
@ -918,7 +918,7 @@ ia64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
|||
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);
|
||||
|
|
|
@ -168,9 +168,9 @@ m68k_register_name (struct gdbarch *gdbarch, int regnum)
|
|||
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);
|
||||
|
|
|
@ -660,14 +660,14 @@ set_mips64_transfers_32bit_regs (char *args, int from_tty,
|
|||
/* Convert to/from a register and the corresponding memory value. */
|
||||
|
||||
static int
|
||||
mips_convert_register_p (int regnum, struct type *type)
|
||||
mips_convert_register_p (struct gdbarch *gdbarch, 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
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -2424,9 +2424,10 @@ rs6000_pseudo_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue