Add target_ops argument to to_close
authorTom Tromey <tromey@redhat.com>
Wed, 18 Dec 2013 04:27:56 +0000 (21:27 -0700)
committerTom Tromey <tromey@redhat.com>
Wed, 19 Feb 2014 14:45:28 +0000 (07:45 -0700)
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.

21 files changed:
gdb/ChangeLog
gdb/bsd-kvm.c
gdb/bsd-uthread.c
gdb/corelow.c
gdb/ctf.c
gdb/exec.c
gdb/go32-nat.c
gdb/linux-nat.c
gdb/mips-linux-nat.c
gdb/monitor.c
gdb/monitor.h
gdb/record-btrace.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/tracepoint.c
gdb/windows-nat.c

index 83910b0a9a8b661f778e22a59b6ba8823880a67e..a98901b10ead64c25adaf78e774f435b94aaab63 100644 (file)
@@ -1,3 +1,28 @@
+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.
index fa7f83c0c8d7859efb04f3291595ee62fdefd96b..35ecebb1c007dd6b15f4760c6d1f6e14efb26902 100644 (file)
@@ -105,7 +105,7 @@ bsd_kvm_open (char *filename, int from_tty)
 }
 
 static void
-bsd_kvm_close (void)
+bsd_kvm_close (struct target_ops *self)
 {
   if (core_kd)
     {
index bf6c390f376a4fcc0f7114d2a03cd38b10a79d0e..d235f41c7fed49384df12ad9f768322ff0581cfe 100644 (file)
@@ -204,7 +204,7 @@ bsd_uthread_activate (struct objfile *objfile)
 /* 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;
index 382bbb2004c23a65ebfc524a6f025781e6689063..8a80be36ffa66912934e15acb6b6524a7b44431c 100644 (file)
@@ -85,7 +85,7 @@ static int gdb_check_format (bfd *);
 
 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);
 
@@ -192,7 +192,7 @@ gdb_check_format (bfd *abfd)
    stack spaces as empty.  */
 
 static void
-core_close (void)
+core_close (struct target_ops *self)
 {
   if (core_bfd)
     {
@@ -223,7 +223,7 @@ core_close (void)
 static void
 core_close_cleanup (void *ignore)
 {
-  core_close ();
+  core_close (NULL);
 }
 
 /* Look for sections whose names start with `.reg/' so that we can
index 71453dfe324359d01ffbf47f6ee0d5f60f793dd8..38c8abb781284261f945aa49c157605d22f0a8fc 100644 (file)
--- a/gdb/ctf.c
+++ b/gdb/ctf.c
@@ -1204,7 +1204,7 @@ ctf_open (char *dirname, int from_tty)
    CTF iterator and context.  */
 
 static void
-ctf_close (void)
+ctf_close (struct target_ops *self)
 {
   int pid;
 
index 23d61876f68ef3410b2a22a1a76c0aae30213faa..1885afd74e19e82a3c0927940b844d0c5c3d57ec 100644 (file)
@@ -112,7 +112,7 @@ exec_close (void)
    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;
 
index 7dc6307c708a2508b9dbcd164032e98eeb0a5f18..1529cc3d5aee42c8f4fb630abf40e696d731eeaf 100644 (file)
@@ -234,7 +234,6 @@ static int dr_ref_count[4];
 #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;
@@ -347,7 +346,7 @@ go32_open (char *name, int from_tty)
 }
 
 static void
-go32_close (void)
+go32_close (struct target_ops *self)
 {
 }
 
index 6c31c3b2fd16ff2d21b4f0fc9df34e9e4d4f2ea5..a76ba30438954c4bc92cf237434f35501b5972b5 100644 (file)
@@ -4788,14 +4788,14 @@ linux_nat_stop (ptid_t ptid)
 }
 
 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
index 627241fa815540d12b3968b58cc637a2b62b8f34..98f8d96d669a51f286a15ce6819d1a95b35a53e4 100644 (file)
@@ -744,7 +744,7 @@ mips_linux_remove_watchpoint (CORE_ADDR addr, int len, int type,
    super implementation.  */
 
 static void
-mips_linux_close (void)
+mips_linux_close (struct target_ops *self)
 {
   struct mips_watchpoint *w;
   struct mips_watchpoint *nw;
index 6c5154f38da9b0d6c1be2874af566836ec55e7c4..e88b28cf85466b4ec130d5743658b7de994c2208 100644 (file)
@@ -853,7 +853,7 @@ monitor_open (char *args, struct monitor_ops *mon_ops, int from_tty)
    control.  */
 
 void
-monitor_close (void)
+monitor_close (struct target_ops *self)
 {
   if (monitor_desc)
     serial_close (monitor_desc);
index c7e7af83d09fd551703ce78f212b23594fdd24c9..07caf97fb7ed5103d718c829e3665562dacb0fab 100644 (file)
@@ -240,7 +240,7 @@ struct monitor_ops
 #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);
index b7a549ad3f14c9fae520a7f5f28773d532d7a91c..75a1364228f2a0e31755014a086ee87883751b62 100644 (file)
@@ -211,7 +211,7 @@ record_btrace_stop_recording (void)
 /* 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;
 
index 0452dcadf5fd5e7f0479f2dbec81469b68bbcaea..04ba714d11e1a975584aae954cd460530965ce91 100644 (file)
@@ -877,7 +877,7 @@ record_full_open (char *name, int from_tty)
 /* "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;
 
index 48c4b4bd27d9af3abca9d731f78a7451d40bf561..0bcfb1f69d601bf3542f252cae71aa914723829c 100644 (file)
@@ -429,7 +429,7 @@ m32r_open (char *args, int from_tty)
 /* 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");
index 6109e64bf6d05d503391df0510822ba9b4190a4c..8dde5cc210ffb3a10719f31c34de9e2281853c18 100644 (file)
@@ -84,7 +84,7 @@ static void ddb_open (char *name, int from_tty);
 
 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);
 
@@ -1732,7 +1732,7 @@ lsi_open (char *name, int from_tty)
 /* Close a connection to the remote board.  */
 
 static void
-mips_close (void)
+mips_close (struct target_ops *self)
 {
   if (mips_is_open)
     {
index 163af41ea896fbadea730c12b4af9e2b0b8be2af..1855f39ec55ce92bb35d0241d15bc2d3d112d1b2 100644 (file)
@@ -76,7 +76,7 @@ static void gdbsim_load (char *prog, int fromtty);
 
 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);
@@ -788,7 +788,7 @@ gdbsim_close_inferior (struct inferior *inf, void *arg)
 /* 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);
index 9e0045adde5344921f8d54df8839929076438684..fb90c5591ac676cba1bbeae26b0a2159585a7d84 100644 (file)
@@ -107,7 +107,7 @@ static void extended_remote_open (char *name, int from_tty);
 
 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);
 
@@ -2991,7 +2991,7 @@ extended_remote_restart (void)
 /* 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 ();
 
index 7ac87283e6bf72b404d4c16dad279873e949e785..e63725af6702424ff9ae87861de9460d3be6c178 100644 (file)
@@ -718,7 +718,7 @@ update_current_target (void)
            (void (*) (char *, int))
            tcomplain);
   de_fault (to_close,
-           (void (*) (void))
+           (void (*) (struct target_ops *))
            target_ignore);
   de_fault (to_post_attach,
            (void (*) (int))
@@ -3833,7 +3833,7 @@ target_close (struct target_ops *targ)
   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");
index 7709c16301f2b67b4637802f00a3fea8e5a3d59f..125d649a88b7ee6704afff870ca2d07e0a194870 100644 (file)
@@ -402,7 +402,7 @@ struct target_ops
        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);
index 80d0620a6af00d74d2550ba514af604b20a61666..47b31907564d4b63055e0c0dc6d5507885ce2d6d 100644 (file)
@@ -4756,7 +4756,7 @@ parse_tsv_definition (char *line, struct uploaded_tsv **utsvp)
 /* Close the trace file and generally clean up.  */
 
 static void
-tfile_close (void)
+tfile_close (struct target_ops *self)
 {
   int pid;
 
index 9212adfefd2fdc349e8b46bda294f193e7e2d863..8dcc410c52ce9cdee9d84669709db5e5dac5757f 100644 (file)
@@ -2481,7 +2481,7 @@ windows_can_run (void)
 }
 
 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)));
This page took 0.046883 seconds and 4 git commands to generate.