* i386-nto-tdep.c (i386nto_supply_gregset, i386nto_supply_fpregset):
authorUlrich Weigand <uweigand@de.ibm.com>
Sun, 6 May 2007 14:30:45 +0000 (14:30 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Sun, 6 May 2007 14:30:45 +0000 (14:30 +0000)
Add REGCACHE parameter.  Use it instead of current_regcache.
(i386nto_supply_regset): Add REGCACHE parameter, pass it to
i386nto_supply_gregset and i386nto_supply_fpregset.
(i386nto_regset_fill): Add REGCACHE parameter; use it instead
of current_regcache.

* nto-procfs.c (procfs_fetch_registers): Pass current_regcache to
nto_supply_ helper functions.
(procfs_store_registers): Pass current_regcache to nto_regset_fill.

* nto-tdep.c (nto_dummy_supply_regset): Add REGCACHE parameter.

* nto-tdep.h (struct nto_target_ops): Add REGCACHE parameter to
supply_greget, supply_fpregset, supply_altregset, supply_regset,
and regset_fill member function pointers.
(nto_dummy_supply_regset): Adapt prototype.

gdb/ChangeLog
gdb/i386-nto-tdep.c
gdb/nto-procfs.c
gdb/nto-tdep.c
gdb/nto-tdep.h

index c49861c50ccd44006615774c9c7c1b72dce0502c..91177cd9e0034793da76e49dff94c4b94050df09 100644 (file)
@@ -1,3 +1,23 @@
+2007-05-06  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * i386-nto-tdep.c (i386nto_supply_gregset, i386nto_supply_fpregset):
+       Add REGCACHE parameter.  Use it instead of current_regcache.
+       (i386nto_supply_regset): Add REGCACHE parameter, pass it to
+       i386nto_supply_gregset and i386nto_supply_fpregset.
+       (i386nto_regset_fill): Add REGCACHE parameter; use it instead
+       of current_regcache.
+
+       * nto-procfs.c (procfs_fetch_registers): Pass current_regcache to
+       nto_supply_ helper functions.
+       (procfs_store_registers): Pass current_regcache to nto_regset_fill.
+
+       * nto-tdep.c (nto_dummy_supply_regset): Add REGCACHE parameter.
+
+       * nto-tdep.h (struct nto_target_ops): Add REGCACHE parameter to
+       supply_greget, supply_fpregset, supply_altregset, supply_regset,
+       and regset_fill member function pointers.
+       (nto_dummy_supply_regset): Adapt prototype.
+
 2007-05-06  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * shnbsd-tdep.c (shnbsd_supply_reg): Add REGCACHE parameter, use it
index f617faf3696e7b2982e726b90396347e6e3ec071..30e72f15eabf4b52ebfa1a6132ad53670006c0c2 100644 (file)
@@ -81,7 +81,7 @@ nto_reg_offset (int regnum)
 }
 
 static void
-i386nto_supply_gregset (char *gpregs)
+i386nto_supply_gregset (struct regcache *regcache, char *gpregs)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
 
@@ -90,29 +90,29 @@ i386nto_supply_gregset (char *gpregs)
                                  i386_collect_gregset);
 
   gdb_assert (tdep->gregset_reg_offset == i386nto_gregset_reg_offset);
-  tdep->gregset->supply_regset (tdep->gregset, current_regcache, -1,
+  tdep->gregset->supply_regset (tdep->gregset, regcache, -1,
                                gpregs, NUM_GPREGS * 4);
 }
 
 static void
-i386nto_supply_fpregset (char *fpregs)
+i386nto_supply_fpregset (struct regcache *regcache, char *fpregs)
 {
   if (nto_cpuinfo_valid && nto_cpuinfo_flags | X86_CPU_FXSR)
-    i387_supply_fxsave (current_regcache, -1, fpregs);
+    i387_supply_fxsave (regcache, -1, fpregs);
   else
-    i387_supply_fsave (current_regcache, -1, fpregs);
+    i387_supply_fsave (regcache, -1, fpregs);
 }
 
 static void
-i386nto_supply_regset (int regset, char *data)
+i386nto_supply_regset (struct regcache *regcache, int regset, char *data)
 {
   switch (regset)
     {
     case NTO_REG_GENERAL:
-      i386nto_supply_gregset (data);
+      i386nto_supply_gregset (regcache, data);
       break;
     case NTO_REG_FLOAT:
-      i386nto_supply_fpregset (data);
+      i386nto_supply_fpregset (regcache, data);
       break;
     }
 }
@@ -177,7 +177,7 @@ i386nto_register_area (int regno, int regset, unsigned *off)
 }
 
 static int
-i386nto_regset_fill (int regset, char *data)
+i386nto_regset_fill (const struct regcache *regcache, int regset, char *data)
 {
   if (regset == NTO_REG_GENERAL)
     {
@@ -187,15 +187,15 @@ i386nto_regset_fill (int regset, char *data)
        {
          int offset = nto_reg_offset (regno);
          if (offset != -1)
-           regcache_raw_collect (current_regcache, regno, data + offset);
+           regcache_raw_collect (regcache, regno, data + offset);
        }
     }
   else if (regset == NTO_REG_FLOAT)
     {
       if (nto_cpuinfo_valid && nto_cpuinfo_flags | X86_CPU_FXSR)
-       i387_collect_fxsave (current_regcache, -1, data);
+       i387_collect_fxsave (regcache, -1, data);
       else
-       i387_collect_fsave (current_regcache, -1, data);
+       i387_collect_fsave (regcache, -1, data);
     }
   else
     return -1;
index bd4cfe92846f51f83ea3385ba8f897d8b3711ea0..8140840c6a7c102e9192ec348cb56a78a54cfbd2 100644 (file)
@@ -727,13 +727,13 @@ procfs_fetch_registers (int regno)
 
   procfs_set_thread (inferior_ptid);
   if (devctl (ctl_fd, DCMD_PROC_GETGREG, &reg, sizeof (reg), &regsize) == EOK)
-    nto_supply_gregset ((char *) &reg.greg);
+    nto_supply_gregset (current_regcache, (char *) &reg.greg);
   if (devctl (ctl_fd, DCMD_PROC_GETFPREG, &reg, sizeof (reg), &regsize)
       == EOK)
-    nto_supply_fpregset ((char *) &reg.fpreg);
+    nto_supply_fpregset (current_regcache, (char *) &reg.fpreg);
   if (devctl (ctl_fd, DCMD_PROC_GETALTREG, &reg, sizeof (reg), &regsize)
       == EOK)
-    nto_supply_altregset ((char *) &reg.altreg);
+    nto_supply_altregset (current_regcache, (char *) &reg.altreg);
 }
 
 /* Copy LEN bytes to/from inferior's memory starting at MEMADDR
@@ -1173,7 +1173,7 @@ procfs_store_registers (int regno)
          if (dev_set == -1)
            continue;
 
-         if (nto_regset_fill (regset, (char *) &reg) == -1)
+         if (nto_regset_fill (current_regcache, regset, (char *) &reg) == -1)
            continue;
 
          err = devctl (ctl_fd, dev_set, &reg, regsize, 0);
index 44a1a4e38c08104f0d6cf41edb3a730d5f594c6d..b0cc87c0f85930559c33d476eadd97ba44a9a43a 100644 (file)
@@ -339,7 +339,7 @@ nto_generic_supply_altregset (const struct regset *regset,
 }
 
 void
-nto_dummy_supply_regset (char *regs)
+nto_dummy_supply_regset (struct regcache *regcache, char *regs)
 {
   /* Do nothing.  */
 }
index df77a932d8202bc5d2c248f134032d6149d6769a..a688ad9591eec72a5b28d357143efc94cb0d033d 100644 (file)
@@ -51,14 +51,14 @@ struct nto_target_ops
    regset it came from.  If reg == -1 update all regsets.  */
   int (*regset_id) (int);
 
-  void (*supply_gregset) (char *);
+  void (*supply_gregset) (struct regcache *, char *);
 
-  void (*supply_fpregset) (char *);
+  void (*supply_fpregset) (struct regcache *, char *);
 
-  void (*supply_altregset) (char *);
+  void (*supply_altregset) (struct regcache *, char *);
 
 /* Given a regset, tell gdb about registers stored in data.  */
-  void (*supply_regset) (int, char *);
+  void (*supply_regset) (struct regcache *, int, char *);
 
 /* Given a register and regset, calculate the offset into the regset
    and stuff it into the last argument.  If regno is -1, calculate the
@@ -68,7 +68,7 @@ struct nto_target_ops
 
 /* Build the Neutrino register set info into the data buffer.  
    Return -1 if unknown regset, 0 otherwise.  */
-  int (*regset_fill) (int, char *);
+  int (*regset_fill) (const struct regcache *, int, char *);
 
 /* Gives the fetch_link_map_offsets function exposure outside of
    solib-svr4.c so that we can override relocate_section_addresses().  */
@@ -174,7 +174,7 @@ void nto_generic_supply_altregset (const struct regset *, struct regcache *,
 
 /* Dummy function for initializing nto_target_ops on targets which do
    not define a particular regset.  */
-void nto_dummy_supply_regset (char *regs);
+void nto_dummy_supply_regset (struct regcache *regcache, char *regs);
 
 int nto_in_dynsym_resolve_code (CORE_ADDR pc);
 
This page took 0.029134 seconds and 4 git commands to generate.