From 5bbcb741a1ccd072d6ff0411e58a60ec887b7887 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Mon, 7 Jul 2003 17:36:26 +0000 Subject: [PATCH] * mips-tdep.c (mips_register_raw_size): Fix compilation failure. (mips_register_byte): Likewise. --- gdb/ChangeLog | 5 +++++ gdb/mips-tdep.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f64ebafc982..fedab717e8d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-07-07 Joel Brobecker + + * mips-tdep.c (mips_register_raw_size): Fix compilation failure. + (mips_register_byte): Likewise. + 2003-07-07 Daniel Jacobowitz * Makefile.in (sparc_tdep_h): New. diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index f39179d3a0f..fc1c2488537 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -50,6 +50,7 @@ #include "sim-regno.h" static void set_reg_offset (CORE_ADDR *saved_regs, int regnum, CORE_ADDR off); +static struct type *mips_register_type (struct gdbarch *gdbarch, int regnum); /* A useful bit in the CP0 status register (PS_REGNUM). */ /* This bit is set if we are emulating 32-bit FPRs on a 64-bit chip. */ @@ -670,7 +671,7 @@ mips_register_raw_size (int regnum) /* For the moment map [NUM_REGS .. 2*NUM_REGS) onto the same raw registers, but always return the virtual size. */ int rawnum = regnum % NUM_REGS; - return TYPE_LENGTH (MIPS_REGISTER_TYPE (rawnum)); + return TYPE_LENGTH (gdbarch_register_type (current_gdbarch, rawnum)); } else internal_error (__FILE__, __LINE__, "Register %d out of range", regnum); @@ -700,7 +701,8 @@ mips_register_byte (int regnum) /* Add space for all the proceeding registers based on their real size. */ for (reg = NUM_REGS; reg < regnum; reg++) - byte += TYPE_LENGTH (MIPS_REGISTER_TYPE ((reg % NUM_REGS))); + byte += TYPE_LENGTH (gdbarch_register_type (current_gdbarch, + (reg % NUM_REGS))); return byte; } else -- 2.30.2