+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.
}
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);
}
/* 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;
}
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;
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);
/* 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;
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);
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;
/* 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);
}
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);
target_load (char *arg, int from_tty)
{
target_dcache_invalidate ();
- (*current_target.to_load) (arg, from_tty);
+ (*current_target.to_load) (¤t_target, arg, from_tty);
}
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))
}
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);
}
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);