* remote.c (process_g_packet): Don't check size.
* gdbarch.sh: Remove register_bytes_ok. * gdbarch.c: Regenerated. * gdbarch.h: Regenerated. * m68k-tdep.c (REGISTER_BYTES_NOFP): Remove. (m68k_register_bytes_ok): Remove. (m68k_gdbarch_init): Don't register m68k_register_bytes_ok.
This commit is contained in:
parent
cd8ab8d1bf
commit
632110b170
|
@ -1,3 +1,13 @@
|
||||||
|
2007-06-06 Vladimir Prus <vladimir@codesourcery.com>
|
||||||
|
|
||||||
|
* remote.c (process_g_packet): Don't check size.
|
||||||
|
* gdbarch.sh: Remove register_bytes_ok.
|
||||||
|
* gdbarch.c: Regenerated.
|
||||||
|
* gdbarch.h: Regenerated.
|
||||||
|
* m68k-tdep.c (REGISTER_BYTES_NOFP): Remove.
|
||||||
|
(m68k_register_bytes_ok): Remove.
|
||||||
|
(m68k_gdbarch_init): Don't register m68k_register_bytes_ok.
|
||||||
|
|
||||||
2007-06-06 Andreas Schwab <schwab@suse.de>
|
2007-06-06 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
* libunwind-frame.c (unw_destroy_addr_space_p): Define.
|
* libunwind-frame.c (unw_destroy_addr_space_p): Define.
|
||||||
|
|
|
@ -174,7 +174,6 @@ struct gdbarch
|
||||||
gdbarch_print_float_info_ftype *print_float_info;
|
gdbarch_print_float_info_ftype *print_float_info;
|
||||||
gdbarch_print_vector_info_ftype *print_vector_info;
|
gdbarch_print_vector_info_ftype *print_vector_info;
|
||||||
gdbarch_register_sim_regno_ftype *register_sim_regno;
|
gdbarch_register_sim_regno_ftype *register_sim_regno;
|
||||||
gdbarch_register_bytes_ok_ftype *register_bytes_ok;
|
|
||||||
gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
|
gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
|
||||||
gdbarch_cannot_store_register_ftype *cannot_store_register;
|
gdbarch_cannot_store_register_ftype *cannot_store_register;
|
||||||
gdbarch_get_longjmp_target_ftype *get_longjmp_target;
|
gdbarch_get_longjmp_target_ftype *get_longjmp_target;
|
||||||
|
@ -300,7 +299,6 @@ struct gdbarch startup_gdbarch =
|
||||||
0, /* print_float_info */
|
0, /* print_float_info */
|
||||||
0, /* print_vector_info */
|
0, /* print_vector_info */
|
||||||
0, /* register_sim_regno */
|
0, /* register_sim_regno */
|
||||||
0, /* register_bytes_ok */
|
|
||||||
0, /* cannot_fetch_register */
|
0, /* cannot_fetch_register */
|
||||||
0, /* cannot_store_register */
|
0, /* cannot_store_register */
|
||||||
0, /* get_longjmp_target */
|
0, /* get_longjmp_target */
|
||||||
|
@ -554,7 +552,6 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
|
||||||
/* Skip verify of print_float_info, has predicate */
|
/* Skip verify of print_float_info, has predicate */
|
||||||
/* Skip verify of print_vector_info, has predicate */
|
/* Skip verify of print_vector_info, has predicate */
|
||||||
/* Skip verify of register_sim_regno, invalid_p == 0 */
|
/* Skip verify of register_sim_regno, invalid_p == 0 */
|
||||||
/* Skip verify of register_bytes_ok, has predicate */
|
|
||||||
/* Skip verify of cannot_fetch_register, invalid_p == 0 */
|
/* Skip verify of cannot_fetch_register, invalid_p == 0 */
|
||||||
/* Skip verify of cannot_store_register, invalid_p == 0 */
|
/* Skip verify of cannot_store_register, invalid_p == 0 */
|
||||||
/* Skip verify of get_longjmp_target, has predicate */
|
/* Skip verify of get_longjmp_target, has predicate */
|
||||||
|
@ -1201,24 +1198,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
|
||||||
fprintf_unfiltered (file,
|
fprintf_unfiltered (file,
|
||||||
"gdbarch_dump: read_pc = <0x%lx>\n",
|
"gdbarch_dump: read_pc = <0x%lx>\n",
|
||||||
(long) current_gdbarch->read_pc);
|
(long) current_gdbarch->read_pc);
|
||||||
#ifdef REGISTER_BYTES_OK_P
|
|
||||||
fprintf_unfiltered (file,
|
|
||||||
"gdbarch_dump: %s # %s\n",
|
|
||||||
"REGISTER_BYTES_OK_P()",
|
|
||||||
XSTRING (REGISTER_BYTES_OK_P ()));
|
|
||||||
#endif
|
|
||||||
fprintf_unfiltered (file,
|
|
||||||
"gdbarch_dump: gdbarch_register_bytes_ok_p() = %d\n",
|
|
||||||
gdbarch_register_bytes_ok_p (current_gdbarch));
|
|
||||||
#ifdef REGISTER_BYTES_OK
|
|
||||||
fprintf_unfiltered (file,
|
|
||||||
"gdbarch_dump: %s # %s\n",
|
|
||||||
"REGISTER_BYTES_OK(nr_bytes)",
|
|
||||||
XSTRING (REGISTER_BYTES_OK (nr_bytes)));
|
|
||||||
#endif
|
|
||||||
fprintf_unfiltered (file,
|
|
||||||
"gdbarch_dump: register_bytes_ok = <0x%lx>\n",
|
|
||||||
(long) current_gdbarch->register_bytes_ok);
|
|
||||||
#ifdef REGISTER_NAME
|
#ifdef REGISTER_NAME
|
||||||
fprintf_unfiltered (file,
|
fprintf_unfiltered (file,
|
||||||
"gdbarch_dump: %s # %s\n",
|
"gdbarch_dump: %s # %s\n",
|
||||||
|
@ -2258,30 +2237,6 @@ set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
|
||||||
gdbarch->register_sim_regno = register_sim_regno;
|
gdbarch->register_sim_regno = register_sim_regno;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
|
|
||||||
{
|
|
||||||
gdb_assert (gdbarch != NULL);
|
|
||||||
return gdbarch->register_bytes_ok != NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
|
|
||||||
{
|
|
||||||
gdb_assert (gdbarch != NULL);
|
|
||||||
gdb_assert (gdbarch->register_bytes_ok != NULL);
|
|
||||||
if (gdbarch_debug >= 2)
|
|
||||||
fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
|
|
||||||
return gdbarch->register_bytes_ok (nr_bytes);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
|
|
||||||
gdbarch_register_bytes_ok_ftype register_bytes_ok)
|
|
||||||
{
|
|
||||||
gdbarch->register_bytes_ok = register_bytes_ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
|
gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
|
||||||
{
|
{
|
||||||
|
|
|
@ -503,31 +503,6 @@ extern void set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, gdbarch_reg
|
||||||
#define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr))
|
#define REGISTER_SIM_REGNO(reg_nr) (gdbarch_register_sim_regno (current_gdbarch, reg_nr))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (REGISTER_BYTES_OK)
|
|
||||||
/* Legacy for systems yet to multi-arch REGISTER_BYTES_OK */
|
|
||||||
#if !defined (REGISTER_BYTES_OK_P)
|
|
||||||
#define REGISTER_BYTES_OK_P() (1)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern int gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch);
|
|
||||||
#if !defined (GDB_TM_FILE) && defined (REGISTER_BYTES_OK_P)
|
|
||||||
#error "Non multi-arch definition of REGISTER_BYTES_OK"
|
|
||||||
#endif
|
|
||||||
#if !defined (REGISTER_BYTES_OK_P)
|
|
||||||
#define REGISTER_BYTES_OK_P() (gdbarch_register_bytes_ok_p (current_gdbarch))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef int (gdbarch_register_bytes_ok_ftype) (long nr_bytes);
|
|
||||||
extern int gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes);
|
|
||||||
extern void set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, gdbarch_register_bytes_ok_ftype *register_bytes_ok);
|
|
||||||
#if !defined (GDB_TM_FILE) && defined (REGISTER_BYTES_OK)
|
|
||||||
#error "Non multi-arch definition of REGISTER_BYTES_OK"
|
|
||||||
#endif
|
|
||||||
#if !defined (REGISTER_BYTES_OK)
|
|
||||||
#define REGISTER_BYTES_OK(nr_bytes) (gdbarch_register_bytes_ok (current_gdbarch, nr_bytes))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum);
|
typedef int (gdbarch_cannot_fetch_register_ftype) (int regnum);
|
||||||
extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum);
|
extern int gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum);
|
||||||
extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register);
|
extern void set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, gdbarch_cannot_fetch_register_ftype *cannot_fetch_register);
|
||||||
|
|
|
@ -480,7 +480,6 @@ M::void:print_vector_info:struct ui_file *file, struct frame_info *frame, const
|
||||||
# MAP a GDB RAW register number onto a simulator register number. See
|
# MAP a GDB RAW register number onto a simulator register number. See
|
||||||
# also include/...-sim.h.
|
# also include/...-sim.h.
|
||||||
f:=:int:register_sim_regno:int reg_nr:reg_nr::legacy_register_sim_regno::0
|
f:=:int:register_sim_regno:int reg_nr:reg_nr::legacy_register_sim_regno::0
|
||||||
F:=:int:register_bytes_ok:long nr_bytes:nr_bytes
|
|
||||||
f::int:cannot_fetch_register:int regnum:regnum::cannot_register_not::0
|
f::int:cannot_fetch_register:int regnum:regnum::cannot_register_not::0
|
||||||
f::int:cannot_store_register:int regnum:regnum::cannot_register_not::0
|
f::int:cannot_store_register:int regnum:regnum::cannot_register_not::0
|
||||||
# setjmp/longjmp support.
|
# setjmp/longjmp support.
|
||||||
|
|
|
@ -54,10 +54,6 @@
|
||||||
#define P_MOVEL_SP 0x2f00
|
#define P_MOVEL_SP 0x2f00
|
||||||
#define P_MOVEML_SP 0x48e7
|
#define P_MOVEML_SP 0x48e7
|
||||||
|
|
||||||
|
|
||||||
#define REGISTER_BYTES_FP (16*4 + 8 + 8*12 + 3*4)
|
|
||||||
#define REGISTER_BYTES_NOFP (16*4 + 8)
|
|
||||||
|
|
||||||
/* Offset from SP to first arg on stack at first instruction of a function */
|
/* Offset from SP to first arg on stack at first instruction of a function */
|
||||||
#define SP_ARG0 (1 * 4)
|
#define SP_ARG0 (1 * 4)
|
||||||
|
|
||||||
|
@ -73,14 +69,6 @@ m68k_local_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
|
||||||
return break_insn;
|
return break_insn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
m68k_register_bytes_ok (long numbytes)
|
|
||||||
{
|
|
||||||
return ((numbytes == REGISTER_BYTES_FP)
|
|
||||||
|| (numbytes == REGISTER_BYTES_NOFP));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Return the GDB type object for the "standard" data type of data in
|
/* Return the GDB type object for the "standard" data type of data in
|
||||||
register N. This should be int for D0-D7, SR, FPCONTROL and
|
register N. This should be int for D0-D7, SR, FPCONTROL and
|
||||||
FPSTATUS, long double for FP0-FP7, and void pointer for all others
|
FPSTATUS, long double for FP0-FP7, and void pointer for all others
|
||||||
|
@ -1044,7 +1032,6 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||||
set_gdbarch_register_type (gdbarch, m68k_register_type);
|
set_gdbarch_register_type (gdbarch, m68k_register_type);
|
||||||
set_gdbarch_register_name (gdbarch, m68k_register_name);
|
set_gdbarch_register_name (gdbarch, m68k_register_name);
|
||||||
set_gdbarch_num_regs (gdbarch, M68K_NUM_REGS);
|
set_gdbarch_num_regs (gdbarch, M68K_NUM_REGS);
|
||||||
set_gdbarch_register_bytes_ok (gdbarch, m68k_register_bytes_ok);
|
|
||||||
set_gdbarch_sp_regnum (gdbarch, M68K_SP_REGNUM);
|
set_gdbarch_sp_regnum (gdbarch, M68K_SP_REGNUM);
|
||||||
set_gdbarch_pc_regnum (gdbarch, M68K_PC_REGNUM);
|
set_gdbarch_pc_regnum (gdbarch, M68K_PC_REGNUM);
|
||||||
set_gdbarch_ps_regnum (gdbarch, M68K_PS_REGNUM);
|
set_gdbarch_ps_regnum (gdbarch, M68K_PS_REGNUM);
|
||||||
|
|
|
@ -3597,8 +3597,6 @@ process_g_packet (struct regcache *regcache)
|
||||||
buf_len = strlen (rs->buf);
|
buf_len = strlen (rs->buf);
|
||||||
|
|
||||||
/* Further sanity checks, with knowledge of the architecture. */
|
/* Further sanity checks, with knowledge of the architecture. */
|
||||||
if (REGISTER_BYTES_OK_P () && !REGISTER_BYTES_OK (buf_len / 2))
|
|
||||||
error (_("Remote 'g' packet reply is wrong length: %s"), rs->buf);
|
|
||||||
if (buf_len > 2 * rsa->sizeof_g_packet)
|
if (buf_len > 2 * rsa->sizeof_g_packet)
|
||||||
error (_("Remote 'g' packet reply is too long: %s"), rs->buf);
|
error (_("Remote 'g' packet reply is too long: %s"), rs->buf);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue