summaryrefslogtreecommitdiff
path: root/gdb/arch-utils.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-12-10 04:58:31 +0000
committerAndrew Cagney <cagney@redhat.com>2001-12-10 04:58:31 +0000
commit46cd78fb4637fcab17b78f8e4c8a6983960f404d (patch)
tree435be82ff1f9395e1f47d03ceddc32ff4b22b182 /gdb/arch-utils.c
parent4611fbebb1aae54d5a58452781ee0a0f0d975265 (diff)
downloadbinutils-gdb-46cd78fb4637fcab17b78f8e4c8a6983960f404d.tar.gz
* arch-utils.c (generic_register_raw_size): New function.
* gdbarch.sh (REGISTER_RAW_SIZE): Use generic_register_raw_size as the static default. * gdbarch.c: Regenerate. * arch-utils.h (generic_register_raw_size): Declare. * config/mips/tm-mips.h (REGISTER_RAW_SIZE): Delete macro. * mips-tdep.c (mips_register_raw_size): Make function static. (mips_gdbarch_init): Initialize register_raw_size.
Diffstat (limited to 'gdb/arch-utils.c')
-rw-r--r--gdb/arch-utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 2b23951fb9b..60c83016011 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -376,6 +376,17 @@ legacy_virtual_frame_pointer (CORE_ADDR pc,
*frame_regnum = FP_REGNUM;
*frame_offset = 0;
}
+
+/* Assume the world is flat. Every register is large enough to fit a
+ target integer. */
+
+int
+generic_register_raw_size (int regnum)
+{
+ gdb_assert (regnum >= 0 && regnum < NUM_REGS + NUM_PSEUDO_REGS);
+ return TARGET_INT_BIT / HOST_CHAR_BIT;
+}
+
/* Functions to manipulate the endianness of the target. */