Add target_ops argument to to_load
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 04:31:27 +0000 (21:31 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:45:42 +0000 (07:45 -0700)
2014-02-19  Tom Tromey  <tromey@redhat.com>

* target.h (struct target_ops) <to_load>: Add argument.
* target.c (target_load): Add argument.
(debug_to_load): Add argument.
(update_current_target): Update.
* remote.c (remote_load): Add 'self' argument.
* remote-sim.c (gdbsim_load): Add 'self' argument.
* remote-mips.c (mips_load): Add 'self' argument.
* remote-m32r-sdi.c (m32r_load): Add 'self' argument.
* monitor.c (monitor_load): Add 'self' argument.
* m32r-rom.c (m32r_load_gen): Add 'self' argument.

gdb/ChangeLog
gdb/m32r-rom.c
gdb/monitor.c
gdb/remote-m32r-sdi.c
gdb/remote-mips.c
gdb/remote-sim.c
gdb/remote.c
gdb/target.c
gdb/target.h

index e53c7e602beeffe2424cd9e22fb7cf7c0bb5e222..3db2aa636ab03fdc6a710ef31c05c9f3fa1b5b5b 100644 (file)
@@ -1,3 +1,16 @@
+2014-02-19  Tom Tromey  <tromey@redhat.com>
+
+       * target.h (struct target_ops) <to_load>: Add argument.
+       * target.c (target_load): Add argument.
+       (debug_to_load): Add argument.
+       (update_current_target): Update.
+       * remote.c (remote_load): Add 'self' argument.
+       * remote-sim.c (gdbsim_load): Add 'self' argument.
+       * remote-mips.c (mips_load): Add 'self' argument.
+       * remote-m32r-sdi.c (m32r_load): Add 'self' argument.
+       * monitor.c (monitor_load): Add 'self' argument.
+       * m32r-rom.c (m32r_load_gen): Add 'self' argument.
+
 2014-02-19  Tom Tromey  <tromey@redhat.com>
 
        * target.h (struct target_ops) <to_terminal_info>: Add argument.
index 6219891959b873d86b65561932c0f5597a5d6801..2ca23ae247cefd78b718437d256fddba38d65a15 100644 (file)
@@ -196,7 +196,7 @@ m32r_load (char *filename, int from_tty)
 }
 
 static void
-m32r_load_gen (char *filename, int from_tty)
+m32r_load_gen (struct target_ops *self, char *filename, int from_tty)
 {
   generic_load (filename, from_tty);
 }
index e88b28cf85466b4ec130d5743658b7de994c2208..6061a85e01df034f8835f4ce7fc912b051a61e85 100644 (file)
@@ -2199,7 +2199,7 @@ monitor_wait_srec_ack (void)
 /* monitor_load -- download a file.  */
 
 static void
-monitor_load (char *args, int from_tty)
+monitor_load (struct target_ops *self, char *args, int from_tty)
 {
   CORE_ADDR load_offset = 0;
   char **argv;
index 37649e4a5d73699de716f91f867b2594d818b9d3..0af8cfc6418c41187eece5a376485325abfc420d 100644 (file)
@@ -1213,7 +1213,7 @@ m32r_remove_breakpoint (struct target_ops *ops,
 }
 
 static void
-m32r_load (char *args, int from_tty)
+m32r_load (struct target_ops *self, char *args, int from_tty)
 {
   struct cleanup *old_chain;
   asection *section;
index e8ef44941045b66839a95816fd7e39073586c275..4338ffa6972bac846fc28afb229a0d84a07fbb98 100644 (file)
@@ -128,7 +128,7 @@ static void pmon_download (char *buffer, int length);
 
 static void pmon_load_fast (char *file);
 
-static void mips_load (char *file, int from_tty);
+static void mips_load (struct target_ops *self, char *file, int from_tty);
 
 static int mips_make_srec (char *buffer, int type, CORE_ADDR memaddr,
                           unsigned char *myaddr, int len);
@@ -3530,7 +3530,7 @@ pmon_load_fast (char *file)
 /* mips_load -- download a file.  */
 
 static void
-mips_load (char *file, int from_tty)
+mips_load (struct target_ops *self, char *file, int from_tty)
 {
   struct regcache *regcache;
 
index 1855f39ec55ce92bb35d0241d15bc2d3d112d1b2..65da8f73b446192014d8aebbddb67ffe142f8a5e 100644 (file)
@@ -72,7 +72,7 @@ static void gdb_os_error (host_callback *, const char *, ...)
 
 static void gdbsim_kill (struct target_ops *);
 
-static void gdbsim_load (char *prog, int fromtty);
+static void gdbsim_load (struct target_ops *self, char *prog, int fromtty);
 
 static void gdbsim_open (char *args, int from_tty);
 
@@ -561,7 +561,7 @@ gdbsim_kill (struct target_ops *ops)
    GDB's symbol tables to match.  */
 
 static void
-gdbsim_load (char *args, int fromtty)
+gdbsim_load (struct target_ops *self, char *args, int fromtty)
 {
   char **argv;
   char *prog;
index f6163a9dcb739d850db98f069e6aa8c3770175ff..0c9de6d4dc368028c730c09b4d2830aa6a9e6b0c 100644 (file)
@@ -11352,7 +11352,7 @@ remote_augmented_libraries_svr4_read (void)
 /* Implementation of to_load.  */
 
 static void
-remote_load (char *name, int from_tty)
+remote_load (struct target_ops *self, char *name, int from_tty)
 {
   generic_load (name, from_tty);
 }
index 97764267c94d45a627fa76a7fa9317d1c91b4a1b..b1ad4db63dd364e2d7c0fd57b6fadb9e72e52f12 100644 (file)
@@ -142,7 +142,7 @@ static void debug_to_terminal_save_ours (struct target_ops *self);
 
 static void debug_to_terminal_ours (struct target_ops *self);
 
-static void debug_to_load (char *, int);
+static void debug_to_load (struct target_ops *self, char *, int);
 
 static int debug_to_can_run (void);
 
@@ -462,7 +462,7 @@ void
 target_load (char *arg, int from_tty)
 {
   target_dcache_invalidate ();
-  (*current_target.to_load) (arg, from_tty);
+  (*current_target.to_load) (&current_target, arg, from_tty);
 }
 
 void
@@ -786,7 +786,7 @@ update_current_target (void)
   de_fault (to_terminal_info,
            default_terminal_info);
   de_fault (to_load,
-           (void (*) (char *, int))
+           (void (*) (struct target_ops *, char *, int))
            tcomplain);
   de_fault (to_post_startup_inferior,
            (void (*) (ptid_t))
@@ -4849,9 +4849,9 @@ debug_to_terminal_info (struct target_ops *self,
 }
 
 static void
-debug_to_load (char *args, int from_tty)
+debug_to_load (struct target_ops *self, char *args, int from_tty)
 {
-  debug_target.to_load (args, from_tty);
+  debug_target.to_load (&debug_target, args, from_tty);
 
   fprintf_unfiltered (gdb_stdlog, "target_load (%s, %d)\n", args, from_tty);
 }
index 884716a24e4f6b5f65b5c3d4a2e5727d7a9fba50..60e0e1636809c03c43c11c56da6f40c6b9f5b669 100644 (file)
@@ -494,7 +494,7 @@ struct target_ops
     void (*to_terminal_save_ours) (struct target_ops *);
     void (*to_terminal_info) (struct target_ops *, const char *, int);
     void (*to_kill) (struct target_ops *);
-    void (*to_load) (char *, int);
+    void (*to_load) (struct target_ops *, char *, int);
     void (*to_create_inferior) (struct target_ops *, 
                                char *, char *, char **, int);
     void (*to_post_startup_inferior) (ptid_t);
This page took 0.041629 seconds and 4 git commands to generate.