From b07993f695bdca0153ee7b9123be9348f6aad4a6 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Fri, 2 Oct 2020 04:17:57 +0200 Subject: [PATCH] Remove unneeded netbsd_add_process() 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 | 6 ++++++ gdbserver/netbsd-low.cc | 15 +-------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index 79e6a3727bc..e93e4eab9b5 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2020-10-13 Kamil Rytarowski x + + * netbsd-low.cc (netbsd_tdesc): Remove. + (netbsd_add_process): Likewise. + (netbsd_process_target::create_inferior): Update. + 2020-10-09 Andrew Burgess * linux-arc-low.cc (arc_linux_read_description): Release the diff --git a/gdbserver/netbsd-low.cc b/gdbserver/netbsd-low.cc index 30028d3a384..b9b8cafd940 100644 --- a/gdbserver/netbsd-low.cc +++ b/gdbserver/netbsd-low.cc @@ -43,19 +43,6 @@ 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); -- 2.30.2