aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2007-06-07 05:00:42 +0000
committerVladimir Prus <vladimir@codesourcery.com>2007-06-07 05:00:42 +0000
commit632110b170821f06baf4eec34716b9ad7b1284f7 (patch)
treeb76b69b61b2ec096bba849447c368d7b2db99a68
parentcd8ab8d1bf84dd23985d6f915b71ca4de856825e (diff)
downloadgdb-632110b170821f06baf4eec34716b9ad7b1284f7.zip
gdb-632110b170821f06baf4eec34716b9ad7b1284f7.tar.gz
gdb-632110b170821f06baf4eec34716b9ad7b1284f7.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/gdbarch.c45
-rw-r--r--gdb/gdbarch.h25
-rwxr-xr-xgdb/gdbarch.sh1
-rw-r--r--gdb/m68k-tdep.c13
-rw-r--r--gdb/remote.c2
6 files changed, 10 insertions, 86 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d524858..5743d9e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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>
* libunwind-frame.c (unw_destroy_addr_space_p): Define.
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index d1825b3..6efc143 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -174,7 +174,6 @@ struct gdbarch
gdbarch_print_float_info_ftype *print_float_info;
gdbarch_print_vector_info_ftype *print_vector_info;
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_store_register_ftype *cannot_store_register;
gdbarch_get_longjmp_target_ftype *get_longjmp_target;
@@ -300,7 +299,6 @@ struct gdbarch startup_gdbarch =
0, /* print_float_info */
0, /* print_vector_info */
0, /* register_sim_regno */
- 0, /* register_bytes_ok */
0, /* cannot_fetch_register */
0, /* cannot_store_register */
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_vector_info, has predicate */
/* 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_store_register, invalid_p == 0 */
/* 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,
"gdbarch_dump: read_pc = <0x%lx>\n",
(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
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2259,30 +2238,6 @@ set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
}
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
gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
{
gdb_assert (gdbarch != NULL);
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 7b404b3..c3233fb 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -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))
#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);
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);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 3b24f47..fc3ae43 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -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
# also include/...-sim.h.
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_store_register:int regnum:regnum::cannot_register_not::0
# setjmp/longjmp support.
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index c96d4d5..9d9f334 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -54,10 +54,6 @@
#define P_MOVEL_SP 0x2f00
#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 */
#define SP_ARG0 (1 * 4)
@@ -73,14 +69,6 @@ m68k_local_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
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
register N. This should be int for D0-D7, SR, FPCONTROL and
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_name (gdbarch, m68k_register_name);
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_pc_regnum (gdbarch, M68K_PC_REGNUM);
set_gdbarch_ps_regnum (gdbarch, M68K_PS_REGNUM);
diff --git a/gdb/remote.c b/gdb/remote.c
index d6e5000..acb30ab 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -3597,8 +3597,6 @@ process_g_packet (struct regcache *regcache)
buf_len = strlen (rs->buf);
/* 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)
error (_("Remote 'g' packet reply is too long: %s"), rs->buf);