Remove unneeded netbsd_add_process()
authorKamil Rytarowski <n54@gmx.com>
Fri, 2 Oct 2020 02:17:57 +0000 (04:17 +0200)
committerKamil Rytarowski <kamil@moritz.systems>
Tue, 13 Oct 2020 14:28:29 +0000 (16:28 +0200)
Currently it does not add any value.

The netbsd_tdesc local variable is no longer needed. Remove it.
The tdesc value is set by the low target now.

gdbserver/ChangeLog:

        * netbsd-low.cc (netbsd_tdesc): Remove.
        (netbsd_add_process): Likewise.
        (netbsd_process_target::create_inferior): Update.

gdbserver/ChangeLog
gdbserver/netbsd-low.cc

index 79e6a3727bc428d6b858d07cae67ef1e8557b311..e93e4eab9b5a1ff4a2b5e2d9d508a574664c775b 100644 (file)
@@ -1,3 +1,9 @@
+2020-10-13  Kamil Rytarowski  <n54@gmx.com>x
+
+       * netbsd-low.cc (netbsd_tdesc): Remove.
+       (netbsd_add_process): Likewise.
+       (netbsd_process_target::create_inferior): Update.
+
 2020-10-09  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * linux-arc-low.cc (arc_linux_read_description): Release the
index 30028d3a384a50bec07869b5f45479330fd0eb32..b9b8cafd94083e1eb37515d2fe9be4200fbe5ac5 100644 (file)
 
 int using_threads = 1;
 
-const struct target_desc *netbsd_tdesc;
-
-/* Call add_process with the given parameters, and initialize
-   the process' private data.  */
-
-static void
-netbsd_add_process (int pid, int attached)
-{
-  struct process_info *proc = add_process (pid, attached);
-  proc->tdesc = netbsd_tdesc;
-  proc->priv = nullptr;
-}
-
 /* Callback used by fork_inferior to start tracing the inferior.  */
 
 static void
@@ -100,7 +87,7 @@ netbsd_process_target::create_inferior (const char *program,
                             get_environ ()->envp (), netbsd_ptrace_fun,
                             nullptr, nullptr, nullptr, nullptr);
 
-  netbsd_add_process (pid, 0);
+  add_process (pid, 0);
 
   post_fork_inferior (pid, program);