From 4ef0bef68cfc777e59156fce1563583c0ffb76d9 Mon Sep 17 00:00:00 2001 From: Alan Hayward Date: Thu, 8 Mar 2018 09:42:21 +0000 Subject: [PATCH] Remove MAX_REGISTER_SIZE define gdb/ * defs.h: Remove MAX_REGISTER_SIZE. * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE asserts. * python/py-unwind.c (pyuw_sniffer): Likewise. --- gdb/ChangeLog | 7 +++++++ gdb/defs.h | 5 ----- gdb/python/py-unwind.c | 1 - gdb/regcache.c | 2 -- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 49b91e1e150..f10476b4ca0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2018-03-07 Alan Hayward + + * defs.h: Remove MAX_REGISTER_SIZE. + * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE + asserts. + * python/py-unwind.c (pyuw_sniffer): Likewise. + 2018-03-07 Tom Tromey * linux-tdep.c (linux_info_proc): Update. diff --git a/gdb/defs.h b/gdb/defs.h index a924573b57f..91988758a3a 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -531,11 +531,6 @@ enum symbol_needs_kind /* Dynamic target-system-dependent parameters for GDB. */ #include "gdbarch.h" -/* * Maximum size of a register. Something small, but large enough for - all known ISAs. If it turns out to be too small, make it bigger. */ - -enum { MAX_REGISTER_SIZE = 64 }; - /* In findvar.c. */ template> diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index a7e3a93ebc4..906a00447e6 100644 --- a/gdb/python/py-unwind.c +++ b/gdb/python/py-unwind.c @@ -583,7 +583,6 @@ pyuw_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, /* `value' validation was done before, just assert. */ gdb_assert (value != NULL); gdb_assert (data_size == TYPE_LENGTH (value_type (value))); - gdb_assert (data_size <= MAX_REGISTER_SIZE); cached_frame->reg[i].data = (gdb_byte *) xmalloc (data_size); memcpy (cached_frame->reg[i].data, value_contents (value), data_size); diff --git a/gdb/regcache.c b/gdb/regcache.c index 40c58a025c0..8e843b20302 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -117,7 +117,6 @@ init_regcache_descr (struct gdbarch *gdbarch) descr->sizeof_register[i] = TYPE_LENGTH (descr->register_type[i]); descr->register_offset[i] = offset; offset += descr->sizeof_register[i]; - gdb_assert (MAX_REGISTER_SIZE >= descr->sizeof_register[i]); } /* Set the real size of the raw register cache buffer. */ descr->sizeof_raw_registers = offset; @@ -127,7 +126,6 @@ init_regcache_descr (struct gdbarch *gdbarch) descr->sizeof_register[i] = TYPE_LENGTH (descr->register_type[i]); descr->register_offset[i] = offset; offset += descr->sizeof_register[i]; - gdb_assert (MAX_REGISTER_SIZE >= descr->sizeof_register[i]); } /* Set the real size of the readonly register cache buffer. */ descr->sizeof_cooked_registers = offset; -- 2.30.2