]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* x86-64-tdep.c (x86_64_supply_fxsave): Add `regnum' argument.
authorMark Kettenis <kettenis@gnu.org>
Sat, 23 Aug 2003 13:58:18 +0000 (13:58 +0000)
committerMark Kettenis <kettenis@gnu.org>
Sat, 23 Aug 2003 13:58:18 +0000 (13:58 +0000)
Update comments.
* x86-64-tdep.h (x86_64_supply_fxsave): Adjust prototype.  Update
comments.
* x86-64-linux-tdep.c (fetch_core_registers): Adjust call to
x86_64_supply_fxsave.
* x86-64-linux-nat.c (supply_fpregset): Adjust call to
x86_64_supply_fxsave.
* amd64fbsd-nat.c (supply_fpregset): Adjust call to
x86_64_supply_fxsave.

gdb/ChangeLog
gdb/amd64fbsd-nat.c
gdb/x86-64-linux-nat.c
gdb/x86-64-linux-tdep.c
gdb/x86-64-tdep.c
gdb/x86-64-tdep.h

index 4c5abcaa1fd58933d90400ee02e5da3f29b6e8f4..dc207c6cf9764ac4424738a38bc9b7cf03be1a52 100644 (file)
@@ -1,3 +1,16 @@
+2003-08-23  Mark Kettenis  <kettenis@gnu.org>
+
+       * x86-64-tdep.c (x86_64_supply_fxsave): Add `regnum' argument.
+       Update comments.
+       * x86-64-tdep.h (x86_64_supply_fxsave): Adjust prototype.  Update
+       comments.
+       * x86-64-linux-tdep.c (fetch_core_registers): Adjust call to
+       x86_64_supply_fxsave.
+       * x86-64-linux-nat.c (supply_fpregset): Adjust call to
+       x86_64_supply_fxsave.
+       * amd64fbsd-nat.c (supply_fpregset): Adjust call to
+       x86_64_supply_fxsave.
+
 2003-08-23  Andreas Jaeger  <aj@suse.de>
 
         * x86-64-tdep.c (x86_64_supply_fxsave): Adjust call to
index 71861d99ccccaa57d56ea4a8218cceefbc98f7ff..e90d8fac061fae470ba58b8a67f83e7bc56ddac0 100644 (file)
@@ -124,7 +124,7 @@ fill_gregset (gregset_t *gregsetp, int regno)
 void
 supply_fpregset (fpregset_t *fpregsetp)
 {
-  x86_64_supply_fxsave ((char *) fpregsetp);
+  x86_64_supply_fxsave ((const char *) fpregsetp, -1);
 }
 
 /* Fill register REGNO (if it is a floating-point register) in
@@ -201,7 +201,7 @@ store_inferior_registers (int regno)
        perror_with_name ("Couldn't get floating point status");
 
       fill_fpregset (&fpregs, regno);
-  
+
       if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
                  (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
        perror_with_name ("Couldn't write floating point status");
index 66a1b68b08a65b3ba8aa851a37027d255988104b..d29d0f78740185953f9e70244c3effe064fb2d0d 100644 (file)
@@ -123,7 +123,7 @@ store_regs (int tid, int regno)
 void
 supply_fpregset (elf_fpregset_t *fpregsetp)
 {
-  x86_64_supply_fxsave ((char *) fpregsetp);
+  x86_64_supply_fxsave ((const char *) fpregsetp, -1);
 }
 
 /* Fill register REGNUM (if it is a floating-point or SSE register) in
index 7aab1d4e2fa38bdfae41a25a30f44c5f3d29431b..e237f9efe65074c7d04d1b79455390885e3fe63e 100644 (file)
@@ -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);
+       x86_64_supply_fxsave (core_reg_sect, -1);
       break;
 
     default:
index 86cb2fcb2d104117fcdc819dfaf9332e41b6b72e..e855503f2baadd6229d9490c89e5c77bdc9f5d86 100644 (file)
@@ -1288,24 +1288,27 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
    bits of these pointers (instead of just the 16-bits of the segment
    selector).  */
 
-/* Fill GDB's register array with the floating-point and SSE register
-   values in *FXSAVE.  This function masks off any of the reserved
-   bits in *FXSAVE.  */
+/* Fill register REGNUM in GDB's register cache with the appropriate
+   floating-point or SSE register value from *FXSAVE.  If REGNUM is
+   -1, do this for all registers.  This function masks off any of the
+   reserved bits in *FXSAVE.  */
 
 void
-x86_64_supply_fxsave (char *fxsave)
+x86_64_supply_fxsave (const char *fxsave, int regnum)
 {
-  i387_supply_fxsave (fxsave, -1);
+  i387_supply_fxsave (fxsave, regnum);
 
   if (fxsave)
     {
-      supply_register (I387_FISEG_REGNUM, fxsave + 12);
+      if (regnum == -1 || regnum == I387_FISEG_REGNUM)
+       supply_register (I387_FISEG_REGNUM, fxsave + 12);
+      if (regnum == -1 || regnum == I387_FOSEG_REGNUM)
       supply_register (I387_FOSEG_REGNUM, fxsave + 20);
     }
 }
 
 /* Fill register REGNUM (if it is a floating-point or SSE register) in
-   *FXSAVE with the value in GDB's register array.  If REGNUM is -1, do
+   *FXSAVE with the value in GDB's register cache.  If REGNUM is -1, do
    this for all registers.  This function doesn't touch any of the
    reserved bits in *FXSAVE.  */
 
index 608219c578ff95ff5b6f4720a2c4124dcc642e19..76bb3d32564bc81339091420e2569a6bc681d403 100644 (file)
@@ -48,14 +48,15 @@ struct frame_info;
 
 void x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch);
 
-/* Fill GDB's register array with the floating-point and SSE register
-   values in *FXSAVE.  This function masks off any of the reserved
-   bits in *FXSAVE.  */
+/* Fill register REGNUM in GDB's register cache with the appropriate
+   floating-point or SSE register value from *FXSAVE.  If REGNUM is
+   -1, do this for all registers.  This function masks off any of the
+   reserved bits in *FXSAVE.  */
 
-void x86_64_supply_fxsave (char *fxsave);
+void x86_64_supply_fxsave (const char *fxsave, int regnum);
 
 /* Fill register REGNUM (if it is a floating-point or SSE register) in
-   *FXSAVE with the value in GDB's register array.  If REGNUM is -1, do
+   *FXSAVE with the value in GDB's register cache.  If REGNUM is -1, do
    this for all registers.  This function doesn't touch any of the
    reserved bits in *FXSAVE.  */