]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add target_ops argument to to_prepare_to_store
authorMarkus Metzger <markus.t.metzger@intel.com>
Mon, 13 Jan 2014 13:24:50 +0000 (14:24 +0100)
committerMarkus Metzger <markus.t.metzger@intel.com>
Thu, 16 Jan 2014 12:06:10 +0000 (13:06 +0100)
2013-12-17  Tom Tromey  <tromey@redhat.com>

* windows-nat.c (windows_prepare_to_store): Add 'self' argument.
* target.h (struct target_ops) <to_prepare_to_store>: Add
argument.
(target_prepare_to_store): Add argument.
* target.c (debug_to_prepare_to_store): Add argument.
(update_current_target): Update.
* remote.c (remote_prepare_to_store): Add 'self' argument.
* remote-sim.c (gdbsim_prepare_to_store): Add 'self' argument.
* remote-mips.c (mips_prepare_to_store): Add 'self' argument.
* remote-m32r-sdi.c (m32r_prepare_to_store): Add 'self' argument.
* record-full.c (record_full_core_prepare_to_store): Add 'self'
argument.
* ravenscar-thread.c (ravenscar_prepare_to_store): Add argument.
* nto-procfs.c (procfs_prepare_to_store): Add 'self' argument.
* monitor.c (monitor_prepare_to_store): Add 'self' argument.
* inf-child.c (inf_child_prepare_to_store): Add 'self' argument.
* go32-nat.c (go32_prepare_to_store): Add 'self' argument.

14 files changed:
gdb/ChangeLog
gdb/go32-nat.c
gdb/inf-child.c
gdb/monitor.c
gdb/nto-procfs.c
gdb/ravenscar-thread.c
gdb/record-full.c
gdb/remote-m32r-sdi.c
gdb/remote-mips.c
gdb/remote-sim.c
gdb/remote.c
gdb/target.c
gdb/target.h
gdb/windows-nat.c

index d8d296147e97ab64a33d48e6cd25420661566ba4..540caf2154b571d58f4c23db7d25ef8f508d848d 100644 (file)
@@ -1,3 +1,23 @@
+2014-01-16  Tom Tromey  <tromey@redhat.com>
+
+       * windows-nat.c (windows_prepare_to_store): Add 'self' argument.
+       * target.h (struct target_ops) <to_prepare_to_store>: Add
+       argument.
+       (target_prepare_to_store): Add argument.
+       * target.c (debug_to_prepare_to_store): Add argument.
+       (update_current_target): Update.
+       * remote.c (remote_prepare_to_store): Add 'self' argument.
+       * remote-sim.c (gdbsim_prepare_to_store): Add 'self' argument.
+       * remote-mips.c (mips_prepare_to_store): Add 'self' argument.
+       * remote-m32r-sdi.c (m32r_prepare_to_store): Add 'self' argument.
+       * record-full.c (record_full_core_prepare_to_store): Add 'self'
+       argument.
+       * ravenscar-thread.c (ravenscar_prepare_to_store): Add argument.
+       * nto-procfs.c (procfs_prepare_to_store): Add 'self' argument.
+       * monitor.c (monitor_prepare_to_store): Add 'self' argument.
+       * inf-child.c (inf_child_prepare_to_store): Add 'self' argument.
+       * go32-nat.c (go32_prepare_to_store): Add 'self' argument.
+
 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
 
        * btrace.h (replay) <replay>: New.
index 22b2d2162ab22709d063b0959fa4316d8aadf4ed..7dc6307c708a2508b9dbcd164032e98eeb0a5f18 100644 (file)
@@ -574,7 +574,7 @@ go32_store_registers (struct target_ops *ops,
 }
 
 static void
-go32_prepare_to_store (struct regcache *regcache)
+go32_prepare_to_store (struct target_ops *self, struct regcache *regcache)
 {
 }
 
index 75944a0c9cf6013aa47f985fc905ddb87d380d80..549e44aa5ccbde53ff9d0e98aed70c7673e3d85a 100644 (file)
@@ -100,7 +100,8 @@ inf_child_post_attach (int pid)
    program being debugged.  */
 
 static void
-inf_child_prepare_to_store (struct regcache *regcache)
+inf_child_prepare_to_store (struct target_ops *self,
+                           struct regcache *regcache)
 {
 }
 
index 94b3a75dd5d00443e874042f49365171f4c11591..2156f7ce80ac011b7256847768e9bd65103966dd 100644 (file)
@@ -1427,7 +1427,7 @@ monitor_store_registers (struct target_ops *ops,
    debugged.  */
 
 static void
-monitor_prepare_to_store (struct regcache *regcache)
+monitor_prepare_to_store (struct target_ops *self, struct regcache *regcache)
 {
   /* Do nothing, since we can store individual regs.  */
 }
index dee4988a68c8e4fe7ef0b16919f2a0fb29b7c16c..c2d0d30f2466f3b6440310be0d5047d07a6f344f 100644 (file)
@@ -1229,7 +1229,7 @@ procfs_kill_inferior (struct target_ops *ops)
 /* Store register REGNO, or all registers if REGNO == -1, from the contents
    of REGISTERS.  */
 static void
-procfs_prepare_to_store (struct regcache *regcache)
+procfs_prepare_to_store (struct target_ops *self, struct regcache *regcache)
 {
 }
 
index 3fdca528d8f81bff0606fb01e8c0d1fd418ce264..fc87d79495c609ac8b33a95b57091de0a58e8049 100644 (file)
@@ -62,7 +62,8 @@ static void ravenscar_fetch_registers (struct target_ops *ops,
                                        struct regcache *regcache, int regnum);
 static void ravenscar_store_registers (struct target_ops *ops,
                                        struct regcache *regcache, int regnum);
-static void ravenscar_prepare_to_store (struct regcache *regcache);
+static void ravenscar_prepare_to_store (struct target_ops *self,
+                                       struct regcache *regcache);
 static void ravenscar_resume (struct target_ops *ops, ptid_t ptid, int step,
                              enum gdb_signal siggnal);
 static void ravenscar_mourn_inferior (struct target_ops *ops);
@@ -303,14 +304,15 @@ ravenscar_store_registers (struct target_ops *ops,
 }
 
 static void
-ravenscar_prepare_to_store (struct regcache *regcache)
+ravenscar_prepare_to_store (struct target_ops *self,
+                           struct regcache *regcache)
 {
   struct target_ops *beneath = find_target_beneath (&ravenscar_ops);
 
   if (!ravenscar_runtime_initialized ()
       || ptid_equal (inferior_ptid, base_magic_null_ptid)
       || ptid_equal (inferior_ptid, ravenscar_running_thread ()))
-    beneath->to_prepare_to_store (regcache);
+    beneath->to_prepare_to_store (beneath, regcache);
   else
     {
       struct gdbarch *gdbarch = get_regcache_arch (regcache);
index a93418c4e52ad1c832339b1aa520bd3dc7462dd3..41b8a54c0341bd790f85ab270ecb8e3dcacb1ee5 100644 (file)
@@ -2145,7 +2145,8 @@ record_full_core_fetch_registers (struct target_ops *ops,
 /* "to_prepare_to_store" method for prec over corefile.  */
 
 static void
-record_full_core_prepare_to_store (struct regcache *regcache)
+record_full_core_prepare_to_store (struct target_ops *self,
+                                  struct regcache *regcache)
 {
 }
 
index 7b122d78f2639f4ce0c8e4fb76d36e083bf2d821..9364b5f2d4813d7c0b0eb2d6f312cda0ff56fe42 100644 (file)
@@ -1012,7 +1012,7 @@ m32r_store_register (struct target_ops *ops,
    debugged.  */
 
 static void
-m32r_prepare_to_store (struct regcache *regcache)
+m32r_prepare_to_store (struct target_ops *self, struct regcache *regcache)
 {
   /* Do nothing, since we can store individual regs.  */
   if (remote_debug)
index 04c4a40f4e0e57fb0b251af48acb109b1e4d0075..adf2643990f932e6515858d949c5a768c452026f 100644 (file)
@@ -90,7 +90,8 @@ static int mips_map_regno (struct gdbarch *, int);
 
 static void mips_set_register (int regno, ULONGEST value);
 
-static void mips_prepare_to_store (struct regcache *regcache);
+static void mips_prepare_to_store (struct target_ops *self,
+                                  struct regcache *regcache);
 
 static int mips_fetch_word (CORE_ADDR addr, unsigned int *valp);
 
@@ -2064,7 +2065,7 @@ mips_fetch_registers (struct target_ops *ops,
    registers, so this function doesn't have to do anything.  */
 
 static void
-mips_prepare_to_store (struct regcache *regcache)
+mips_prepare_to_store (struct target_ops *self, struct regcache *regcache)
 {
 }
 
index fbb8fb6ba346b1695eac59f13523b7fec3000451..93090875880a497a35be3edd8a09c4c55636d6be 100644 (file)
@@ -81,7 +81,8 @@ static void gdbsim_close (void);
 static void gdbsim_detach (struct target_ops *ops, const char *args,
                           int from_tty);
 
-static void gdbsim_prepare_to_store (struct regcache *regcache);
+static void gdbsim_prepare_to_store (struct target_ops *self,
+                                    struct regcache *regcache);
 
 static void gdbsim_files_info (struct target_ops *target);
 
@@ -1052,7 +1053,7 @@ gdbsim_wait (struct target_ops *ops,
    debugged.  */
 
 static void
-gdbsim_prepare_to_store (struct regcache *regcache)
+gdbsim_prepare_to_store (struct target_ops *self, struct regcache *regcache)
 {
   /* Do nothing, since we can store individual regs.  */
 }
index fca22509e979628765c844f4456285027ef9f4f4..2c0f3ba21ea2bf1730bdc188cd592f9380a67b18 100644 (file)
@@ -97,7 +97,8 @@ static void async_handle_remote_sigint_twice (int);
 
 static void remote_files_info (struct target_ops *ignore);
 
-static void remote_prepare_to_store (struct regcache *regcache);
+static void remote_prepare_to_store (struct target_ops *self,
+                                    struct regcache *regcache);
 
 static void remote_open (char *name, int from_tty);
 
@@ -6466,7 +6467,7 @@ remote_fetch_registers (struct target_ops *ops,
    first.  */
 
 static void
-remote_prepare_to_store (struct regcache *regcache)
+remote_prepare_to_store (struct target_ops *self, struct regcache *regcache)
 {
   struct remote_arch_state *rsa = get_remote_arch_state ();
   int i;
index 25002b3d347130938167780feeb0e6b794972595..bfb06332067debbca850c59debd30f1351f3d29c 100644 (file)
@@ -85,7 +85,8 @@ static struct target_ops debug_target;
 
 static void debug_to_open (char *, int);
 
-static void debug_to_prepare_to_store (struct regcache *);
+static void debug_to_prepare_to_store (struct target_ops *self,
+                                      struct regcache *);
 
 static void debug_to_files_info (struct target_ops *);
 
@@ -716,7 +717,7 @@ update_current_target (void)
            (void (*) (int))
            target_ignore);
   de_fault (to_prepare_to_store,
-           (void (*) (struct regcache *))
+           (void (*) (struct target_ops *, struct regcache *))
            noprocess);
   de_fault (deprecated_xfer_memory,
            (int (*) (CORE_ADDR, gdb_byte *, int, int,
@@ -4463,9 +4464,9 @@ target_call_history_range (ULONGEST begin, ULONGEST end, int flags)
 }
 
 static void
-debug_to_prepare_to_store (struct regcache *regcache)
+debug_to_prepare_to_store (struct target_ops *self, struct regcache *regcache)
 {
-  debug_target.to_prepare_to_store (regcache);
+  debug_target.to_prepare_to_store (&debug_target, regcache);
 
   fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n");
 }
index d0356e167a204d5bc6aabafd1e89f951e32dee9c..18ae6e345db5b8ebaeda6985456f5f109d3a41a1 100644 (file)
@@ -379,7 +379,7 @@ struct target_ops
                       ptid_t, struct target_waitstatus *, int);
     void (*to_fetch_registers) (struct target_ops *, struct regcache *, int);
     void (*to_store_registers) (struct target_ops *, struct regcache *, int);
-    void (*to_prepare_to_store) (struct regcache *);
+    void (*to_prepare_to_store) (struct target_ops *, struct regcache *);
 
     /* Transfer LEN bytes of memory between GDB address MYADDR and
        target address MEMADDR.  If WRITE, transfer them to the target, else
@@ -1011,7 +1011,7 @@ extern void target_store_registers (struct regcache *regcache, int regs);
    debugged.  */
 
 #define        target_prepare_to_store(regcache)       \
-     (*current_target.to_prepare_to_store) (regcache)
+     (*current_target.to_prepare_to_store) (&current_target, regcache)
 
 /* Determine current address space of thread PTID.  */
 
index e8544acfda205472e7cd197c7b1cb1a8839fc431..5bcb7b70cd58d0c1c2ec60a8de989bd690a61c50 100644 (file)
@@ -2468,7 +2468,7 @@ windows_kill_inferior (struct target_ops *ops)
 }
 
 static void
-windows_prepare_to_store (struct regcache *regcache)
+windows_prepare_to_store (struct target_ops *self, struct regcache *regcache)
 {
   /* Do nothing, since we can store individual regs.  */
 }