summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2002-08-16 01:23:17 +0000
committerMichael Snyder <msnyder@specifix.com>2002-08-16 01:23:17 +0000
commite8ed0f970eae79beb0501358f844014b44d3e403 (patch)
tree34c75c4bda4b3fba8016309580cb729e4dfab375
parent3957c785f50cb99a0960553eb311b02fbef14cfa (diff)
downloadgdb-e8ed0f970eae79beb0501358f844014b44d3e403.tar.gz
2002-08-15 Michael Snyder <msnyder@redhat.com>
* config/mips/tm-mips.h (REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW, REGISTER_CONVERTIBLE, MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE): Delete. * mips-tdep.c (mips_gdbarch_init): Set the above in the gdbarch. (mips_register_convertible, mips_register_convert_to_virtual, mips_register_convert_to_raw): Make static.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/config/mips/tm-mips.h28
-rw-r--r--gdb/mips-tdep.c13
3 files changed, 19 insertions, 31 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9102944c797..d8527bbfb02 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2002-08-15 Michael Snyder <msnyder@redhat.com>
+
+ * config/mips/tm-mips.h (REGISTER_CONVERT_TO_VIRTUAL,
+ REGISTER_CONVERT_TO_RAW, REGISTER_CONVERTIBLE,
+ MAX_REGISTER_RAW_SIZE, MAX_REGISTER_VIRTUAL_SIZE): Delete.
+ * mips-tdep.c (mips_gdbarch_init): Set the above in the gdbarch.
+ (mips_register_convertible, mips_register_convert_to_virtual,
+ mips_register_convert_to_raw): Make static.
+
2002-08-15 Andrew Cagney <ac131313@redhat.com>
* infcmd.c (vector_info): New function.
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index 500207214c7..7e667b744c4 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -161,39 +161,11 @@ extern void mips_do_registers_info (int, int);
#define REGISTER_BYTE(N) ((N) * MIPS_REGSIZE)
-/* Covert between the RAW and VIRTUAL registers.
-
- Some MIPS (SR, FSR, FIR) have a `raw' size of MIPS_REGSIZE but are
- really 32 bit registers. This is a legacy of the 64 bit MIPS GDB
- protocol which transfers 64 bits for 32 bit registers. */
-
-extern int mips_register_convertible (int reg_nr);
-#define REGISTER_CONVERTIBLE(N) (mips_register_convertible ((N)))
-
-
-void mips_register_convert_to_virtual (int reg_nr, struct type *virtual_type,
- char *raw_buf, char *virt_buf);
-#define REGISTER_CONVERT_TO_VIRTUAL(N,VIRTUAL_TYPE,RAW_BUF,VIRT_BUF) \
- mips_register_convert_to_virtual (N,VIRTUAL_TYPE,RAW_BUF,VIRT_BUF)
-
-void mips_register_convert_to_raw (struct type *virtual_type, int reg_nr,
- char *virt_buf, char *raw_buf);
-#define REGISTER_CONVERT_TO_RAW(VIRTUAL_TYPE,N,VIRT_BUF,RAW_BUF) \
- mips_register_convert_to_raw (VIRTUAL_TYPE,N,VIRT_BUF,RAW_BUF)
-
/* Number of bytes of storage in the program's representation
for register N. */
#define REGISTER_VIRTUAL_SIZE(N) TYPE_LENGTH (REGISTER_VIRTUAL_TYPE (N))
-/* Largest value REGISTER_RAW_SIZE can have. */
-
-#define MAX_REGISTER_RAW_SIZE 8
-
-/* Largest value REGISTER_VIRTUAL_SIZE can have. */
-
-#define MAX_REGISTER_VIRTUAL_SIZE 8
-
/* Return the GDB type object for the "standard" data type of data in
register N. */
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 142b535ce7b..a054c13b1fe 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -439,7 +439,7 @@ mips_register_raw_size (int reg_nr)
/* Convert between RAW and VIRTUAL registers. The RAW register size
defines the remote-gdb packet. */
-int
+static int
mips_register_convertible (int reg_nr)
{
if (mips64_transfers_32bit_regs_p)
@@ -448,7 +448,7 @@ mips_register_convertible (int reg_nr)
return (REGISTER_RAW_SIZE (reg_nr) > REGISTER_VIRTUAL_SIZE (reg_nr));
}
-void
+static void
mips_register_convert_to_virtual (int n, struct type *virtual_type,
char *raw_buf, char *virt_buf)
{
@@ -462,7 +462,7 @@ mips_register_convert_to_virtual (int n, struct type *virtual_type,
TYPE_LENGTH (virtual_type));
}
-void
+static void
mips_register_convert_to_raw (struct type *virtual_type, int n,
char *virt_buf, char *raw_buf)
{
@@ -4981,6 +4981,8 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_double_bit (gdbarch, 64);
set_gdbarch_long_double_bit (gdbarch, 64);
set_gdbarch_register_raw_size (gdbarch, mips_register_raw_size);
+ set_gdbarch_max_register_raw_size (gdbarch, 8);
+ set_gdbarch_max_register_virtual_size (gdbarch, 8);
tdep->found_abi = found_abi;
tdep->mips_abi = mips_abi;
@@ -5204,6 +5206,11 @@ mips_gdbarch_init (struct gdbarch_info info,
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (mips_call_dummy_words));
set_gdbarch_push_return_address (gdbarch, mips_push_return_address);
set_gdbarch_register_convertible (gdbarch, generic_register_convertible_not);
+ set_gdbarch_register_convert_to_virtual (gdbarch,
+ mips_register_convert_to_virtual);
+ set_gdbarch_register_convert_to_raw (gdbarch,
+ mips_register_convert_to_raw);
+
set_gdbarch_coerce_float_to_double (gdbarch, mips_coerce_float_to_double);
set_gdbarch_frame_chain_valid (gdbarch, func_frame_chain_valid);