aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-linux-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-10-30 21:22:13 +0000
committerMark Kettenis <kettenis@gnu.org>2003-10-30 21:22:13 +0000
commitbb489b3c99cfe1484a3bbd37acdaee5f2cf96b98 (patch)
treee99937d922442043417dc23dff5a335affe5a23c /gdb/i386-linux-tdep.c
parentda285bc432e810ddf36944fc894266a9a1f665d5 (diff)
downloadbinutils-bb489b3c99cfe1484a3bbd37acdaee5f2cf96b98.zip
binutils-bb489b3c99cfe1484a3bbd37acdaee5f2cf96b98.tar.gz
binutils-bb489b3c99cfe1484a3bbd37acdaee5f2cf96b98.tar.bz2
* 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.
Diffstat (limited to 'gdb/i386-linux-tdep.c')
-rw-r--r--gdb/i386-linux-tdep.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 6d284f1..97845bf 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 <asm/sigcontext.h>. */
-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