* sparc64-tdep.h (stryct_frame_info, struct trad_frame_saved_reg):
[deliverable/binutils-gdb.git] / gdb / x86-64-linux-tdep.c
index 2c499530115e16138b48abc99cf51f4de3b46575..fee1233f4fc3a16bc3829f7d194ca76622a236a8 100644 (file)
@@ -1,7 +1,6 @@
 /* Target-dependent code for GNU/Linux running on x86-64, for GDB.
 
-   Copyright 2001, 2003 Free Software Foundation, Inc.
-
+   Copyright 2001, 2003, 2004 Free Software Foundation, Inc.
    Contributed by Jiri Smid, SuSE Labs.
 
    This file is part of GDB.
@@ -69,6 +68,7 @@ static int user_to_gdb_regmap[] =
   USER_R8, USER_R9, USER_R10, USER_R11,
   USER_R12, USER_R13, USER_R14, USER_R15,
   USER_RIP, USER_EFLAGS,
+  USER_CS, USER_SS,
   USER_DS, USER_ES, USER_FS, USER_GS
 };
 
@@ -123,7 +123,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
       if (core_reg_size != 512)
        warning ("Wrong size XMM register set in core file.");
       else
-       x86_64_supply_fxsave (core_reg_sect, -1);
+       x86_64_supply_fxsave (current_regcache, -1, core_reg_sect);
       break;
 
     default:
@@ -234,7 +234,7 @@ x86_64_linux_sigcontext_addr (struct frame_info *next_frame)
 \f
 
 /* From <asm/sigcontext.h>.  */
-static int x86_64_linux_sc_reg_offset[X86_64_NUM_GREGS] =
+static int x86_64_linux_sc_reg_offset[] =
 {
   13 * 8,                      /* %rax */
   11 * 8,                      /* %rbx */
@@ -254,13 +254,15 @@ static int x86_64_linux_sc_reg_offset[X86_64_NUM_GREGS] =
   7 * 8,                       /* %r15 */
   16 * 8,                      /* %rip */
   17 * 8,                      /* %eflags */
-  -1,                          /* %ds */
-  -1,                          /* %es */
 
-  /* FIXME: kettenis/2002030531: The registers %fs and %gs are
+  /* FIXME: kettenis/2002030531: The registers %cs, %fs and %gs are
      available in `struct sigcontext'.  However, they only occupy two
      bytes instead of four, which makes using them here rather
      difficult.  Leave them out for now.  */
+  -1,                          /* %cs */
+  -1,                          /* %ss */
+  -1,                          /* %ds */
+  -1,                          /* %es */
   -1,                          /* %fs */
   -1                           /* %gs */
 };
@@ -275,7 +277,7 @@ x86_64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 
   tdep->sigcontext_addr = x86_64_linux_sigcontext_addr;
   tdep->sc_reg_offset = x86_64_linux_sc_reg_offset;
-  tdep->sc_num_regs = X86_64_NUM_GREGS;
+  tdep->sc_num_regs = ARRAY_SIZE (x86_64_linux_sc_reg_offset);
 }
 \f
 
This page took 0.02746 seconds and 4 git commands to generate.