+2014-02-19 Tom Tromey <tromey@redhat.com>
+
+ * windows-nat.c (windows_close): Add 'self' argument.
+ * tracepoint.c (tfile_close): Add 'self' argument.
+ * target.h (struct target_ops) <to_close>: Add argument.
+ * target.c (target_close): Add argument.
+ (update_current_target): Update.
+ * remote.c (remote_close): Add 'self' argument.
+ * remote-sim.c (gdbsim_close): Add 'self' argument.
+ * remote-mips.c (mips_close): Add 'self' argument.
+ * remote-m32r-sdi.c (m32r_close): Add 'self' argument.
+ * record-full.c (record_full_close): Add 'self' argument.
+ * record-btrace.c (record_btrace_close): Add 'self' argument.
+ * monitor.h (monitor_close): Add 'self' argument.
+ * monitor.c (monitor_close): Add 'self' argument.
+ * mips-linux-nat.c (mips_linux_close): Add 'self' argument.
+ * linux-nat.c (linux_nat_close): Add argument.
+ * go32-nat.c (go32_close): Add 'self' argument.
+ * exec.c (exec_close_1): Add 'self' argument.
+ * ctf.c (ctf_close): Add 'self' argument.
+ * corelow.c (core_close): Add 'self' argument.
+ (core_close_cleanup): Update.
+ * bsd-uthread.c (bsd_uthread_close): Add 'self' argument.
+ * bsd-kvm.c (bsd_kvm_close): Add 'self' argument.
+
2014-02-19 Tom Tromey <tromey@redhat.com>
* remote.c (remote_load): New function.
}
static void
-bsd_kvm_close (void)
+bsd_kvm_close (struct target_ops *self)
{
if (core_kd)
{
/* Cleanup due to deactivation. */
static void
-bsd_uthread_close (void)
+bsd_uthread_close (struct target_ops *self)
{
bsd_uthread_active = 0;
bsd_uthread_thread_run_addr = 0;
static void core_open (char *, int);
-static void core_close (void);
+static void core_close (struct target_ops *self);
static void core_close_cleanup (void *ignore);
stack spaces as empty. */
static void
-core_close (void)
+core_close (struct target_ops *self)
{
if (core_bfd)
{
static void
core_close_cleanup (void *ignore)
{
- core_close ();
+ core_close (NULL);
}
/* Look for sections whose names start with `.reg/' so that we can
CTF iterator and context. */
static void
-ctf_close (void)
+ctf_close (struct target_ops *self)
{
int pid;
sections and closes all executable bfds from all program spaces. */
static void
-exec_close_1 (void)
+exec_close_1 (struct target_ops *self)
{
using_exec_ops = 0;
#define SOME_PID 42
static int prog_has_started = 0;
-
static void go32_mourn_inferior (struct target_ops *ops);
static struct target_ops go32_ops;
}
static void
-go32_close (void)
+go32_close (struct target_ops *self)
{
}
}
static void
-linux_nat_close (void)
+linux_nat_close (struct target_ops *self)
{
/* Unregister from the event loop. */
if (linux_nat_is_async_p (NULL))
linux_nat_async (NULL, NULL, 0);
if (linux_ops->to_close)
- linux_ops->to_close ();
+ linux_ops->to_close (linux_ops);
}
/* When requests are passed down from the linux-nat layer to the
super implementation. */
static void
-mips_linux_close (void)
+mips_linux_close (struct target_ops *self)
{
struct mips_watchpoint *w;
struct mips_watchpoint *nw;
control. */
void
-monitor_close (void)
+monitor_close (struct target_ops *self)
{
if (monitor_desc)
serial_close (monitor_desc);
#define SREC_SIZE 160
extern void monitor_open (char *args, struct monitor_ops *ops, int from_tty);
-extern void monitor_close (void);
+extern void monitor_close (struct target_ops *self);
extern char *monitor_supply_register (struct regcache *regcache,
int regno, char *valstr);
extern int monitor_expect (char *prompt, char *buf, int buflen);
/* The to_close method of target record-btrace. */
static void
-record_btrace_close (void)
+record_btrace_close (struct target_ops *self)
{
struct thread_info *tp;
/* "to_close" target method. Close the process record target. */
static void
-record_full_close (void)
+record_full_close (struct target_ops *self)
{
struct record_full_core_buf_entry *entry;
/* Close out all files and local state before this target loses control. */
static void
-m32r_close (void)
+m32r_close (struct target_ops *self)
{
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "m32r_close()\n");
static void lsi_open (char *name, int from_tty);
-static void mips_close (void);
+static void mips_close (struct target_ops *self);
static int mips_map_regno (struct gdbarch *, int);
/* Close a connection to the remote board. */
static void
-mips_close (void)
+mips_close (struct target_ops *self)
{
if (mips_is_open)
{
static void gdbsim_open (char *args, int from_tty);
-static void gdbsim_close (void);
+static void gdbsim_close (struct target_ops *self);
static void gdbsim_detach (struct target_ops *ops, const char *args,
int from_tty);
/* Close out all files and local state before this target loses control. */
static void
-gdbsim_close (void)
+gdbsim_close (struct target_ops *self)
{
struct sim_inferior_data *sim_data
= get_sim_inferior_data (current_inferior (), SIM_INSTANCE_NOT_NEEDED);
static void remote_open_1 (char *, int, struct target_ops *, int extended_p);
-static void remote_close (void);
+static void remote_close (struct target_ops *self);
static void remote_mourn (struct target_ops *ops);
/* Clean up connection to a remote debugger. */
static void
-remote_close (void)
+remote_close (struct target_ops *self)
{
struct remote_state *rs = get_remote_state ();
(void (*) (char *, int))
tcomplain);
de_fault (to_close,
- (void (*) (void))
+ (void (*) (struct target_ops *))
target_ignore);
de_fault (to_post_attach,
(void (*) (int))
if (targ->to_xclose != NULL)
targ->to_xclose (targ);
else if (targ->to_close != NULL)
- targ->to_close ();
+ targ->to_close (targ);
if (targetdebug)
fprintf_unfiltered (gdb_stdlog, "target_close ()\n");
New re-entrant targets provide "to_xclose" and that is expected
to xfree everything (including the "struct target_ops"). */
void (*to_xclose) (struct target_ops *targ);
- void (*to_close) (void);
+ void (*to_close) (struct target_ops *);
void (*to_attach) (struct target_ops *ops, char *, int);
void (*to_post_attach) (int);
void (*to_detach) (struct target_ops *ops, const char *, int);
/* Close the trace file and generally clean up. */
static void
-tfile_close (void)
+tfile_close (struct target_ops *self)
{
int pid;
}
static void
-windows_close (void)
+windows_close (struct target_ops *self)
{
DEBUG_EVENTS (("gdb: windows_close, inferior_ptid=%d\n",
ptid_get_pid (inferior_ptid)));