From bb489b3c99cfe1484a3bbd37acdaee5f2cf96b98 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Thu, 30 Oct 2003 21:22:13 +0000 Subject: [PATCH] * i386-linux-tdep.c (i386_linux_sc_reg_offset): Don't explicitly specify size of array. (i386_linux_init_abi): Remove initialization of TDEP->num_xmm_regs. Use I386_LINUX_NUM_REGS for number of registers. Use ARRAY_SIZE to initialize TDEP->sc_num_regs. --- gdb/ChangeLog | 6 ++++++ gdb/i386-linux-tdep.c | 10 +++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e6e7adb38d1..302823cfe88 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2003-10-30 Mark Kettenis + * i386-linux-tdep.c (i386_linux_sc_reg_offset): Don't explicitly + specify size of array. + (i386_linux_init_abi): Remove initialization of + TDEP->num_xmm_regs. Use I386_LINUX_NUM_REGS for number of + registers. Use ARRAY_SIZE to initialize TDEP->sc_num_regs. + * config/i386/fbsd64.mt (TDEPFILES): Add corelow.o. * config/i386/fbsd64.mh (NATDEPFILES): Remove corelow.o and core-regset.o. diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index 6d284f1ea98..97845bf1638 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -440,7 +440,7 @@ i386_linux_svr4_fetch_link_map_offsets (void) /* From . */ -static int i386_linux_sc_reg_offset[I386_NUM_GREGS] = +static int i386_linux_sc_reg_offset[] = { 11 * 4, /* %eax */ 10 * 4, /* %ecx */ @@ -468,15 +468,11 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) /* GNU/Linux uses ELF. */ i386_elf_init_abi (info, gdbarch); - /* We support the SSE registers on GNU/Linux. */ - tdep->num_xmm_regs = I386_NUM_XREGS - 1; - /* set_gdbarch_num_regs (gdbarch, I386_SSE_NUM_REGS); */ - /* Since we have the extra "orig_eax" register on GNU/Linux, we have to adjust a few things. */ set_gdbarch_write_pc (gdbarch, i386_linux_write_pc); - set_gdbarch_num_regs (gdbarch, I386_SSE_NUM_REGS + 1); + set_gdbarch_num_regs (gdbarch, I386_LINUX_NUM_REGS); set_gdbarch_register_name (gdbarch, i386_linux_register_name); set_gdbarch_register_reggroup_p (gdbarch, i386_linux_register_reggroup_p); @@ -484,7 +480,7 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) tdep->sigcontext_addr = i386_linux_sigcontext_addr; tdep->sc_reg_offset = i386_linux_sc_reg_offset; - tdep->sc_num_regs = I386_NUM_GREGS; + tdep->sc_num_regs = ARRAY_SIZE (i386_linux_sc_reg_offset); /* When the i386 Linux kernel calls a signal handler, the return address points to a bit of code on the stack. This function is -- 2.30.2