]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
prefork_hook: Remove 'args' parameter
authorPedro Alves <pedro@palves.net>
Thu, 3 Jun 2021 18:39:18 +0000 (19:39 +0100)
committerPedro Alves <pedro@palves.net>
Mon, 14 Jun 2021 20:31:27 +0000 (21:31 +0100)
prefork_hook's 'args' parameter is only used in debug output in
gdbserver.  Remove it.

gdb/ChangeLog:
yyyy-mm-dd  Pedro Alves  <pedro@palves.net>

* fork-child.c (prefork_hook): Remove 'args' parameter.  All
callers adjusted.
* nat/fork-inferior.h (prefork_hook): Remove 'args' parameter.
All callers adjusted.
* nat/fork-inferior.c (fork_inferior): Adjust.

gdbserver/fork-child.cc
yyyy-mm-dd  Pedro Alves  <pedro@palves.net>

* fork-child.cc (prefork_hook): Remove 'args' parameter, and
references.

Change-Id: Iaf8977af7dd6915c123b0d50ded93395bdafd920

gdb/fork-child.c
gdb/nat/fork-inferior.c
gdb/nat/fork-inferior.h
gdbserver/fork-child.cc

index 3ce7d64b85546f7b3cc471e51ce693606d0fb806..41135b53f9b972c3408087e72850dcd403bf9952 100644 (file)
@@ -59,7 +59,7 @@ static struct ui *saved_ui = NULL;
 /* See nat/fork-inferior.h.  */
 
 void
-prefork_hook (const char *args)
+prefork_hook ()
 {
   gdb_assert (saved_ui == NULL);
   /* Retain a copy of our UI, since the child will replace this value
index d280e1120ccda61c62b404711065613d6f8c22e7..7d56250c979c744b33c9e6fe8a8bd394e79d039b 100644 (file)
@@ -317,7 +317,7 @@ fork_inferior (const char *exec_file_arg, const std::string &allargs,
 
   /* Perform any necessary actions regarding to TTY before the
      fork/vfork call.  */
-  prefork_hook (allargs.c_str ());
+  prefork_hook ();
 
   /* It is generally good practice to flush any possible pending stdio
      output prior to doing a fork, to avoid the possibility of both
index aae2aa6a85489e13d5ef6d90bcea7c738f1cd221..f45ec9047c884b51798ecc92c254ab6f3e41394c 100644 (file)
@@ -58,10 +58,9 @@ extern ptid_t startup_inferior (process_stratum_target *proc_target,
                                struct target_waitstatus *mystatus,
                                ptid_t *myptid);
 
-/* Perform any necessary tasks before a fork/vfork takes place.  ARGS
-   is a string containing all the arguments received by the inferior.
-   This function is mainly used by fork_inferior.  */
-extern void prefork_hook (const char *args);
+/* Perform any necessary tasks before a fork/vfork takes place.  This
+   function is mainly used by fork_inferior.  */
+extern void prefork_hook ();
 
 /* Perform any necessary tasks after a fork/vfork takes place.  This
    function is mainly used by fork_inferior.  */
index a431e7ef8893e5f0241fd79c8ab13df6f37275b2..9678133243d305486dfc3bff04253b15482e6a0f 100644 (file)
@@ -42,14 +42,9 @@ restore_old_foreground_pgrp (void)
 /* See nat/fork-inferior.h.  */
 
 void
-prefork_hook (const char *args)
+prefork_hook ()
 {
   client_state &cs = get_client_state ();
-  if (debug_threads)
-    {
-      debug_printf ("args: %s\n", args);
-      debug_flush ();
-    }
 
 #ifdef SIGTTOU
   signal (SIGTTOU, SIG_DFL);