From patchwork Thu Feb 14 15:37:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 31472 Received: (qmail 26089 invoked by alias); 14 Feb 2019 15:38:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 26079 invoked by uid 89); 14 Feb 2019 15:38:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=jun, june, June, Jun X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Feb 2019 15:38:09 +0000 Received: from svr-orw-mbx-06.mgc.mentorg.com ([147.34.90.206]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1guJ5T-0001Ga-Oa from Thomas_Schwinge@mentor.com ; Thu, 14 Feb 2019 07:38:07 -0800 Received: from svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) by SVR-ORW-MBX-06.mgc.mentorg.com (147.34.90.206) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 14 Feb 2019 07:38:05 -0800 Received: from tftp-cs (147.34.91.1) by svr-orw-mbx-04.mgc.mentorg.com (147.34.90.204) with Microsoft SMTP Server id 15.0.1320.4 via Frontend Transport; Thu, 14 Feb 2019 07:38:05 -0800 Received: by tftp-cs (Postfix, from userid 49978) id D0E2CC2320; Thu, 14 Feb 2019 07:38:04 -0800 (PST) From: Thomas Schwinge To: CC: Sergio Durigan Junior , Pedro Alves Subject: Re: [PATCH v7 3/4] Share fork_inferior et al with gdbserver In-Reply-To: <87tw3rl56n.fsf@redhat.com> References: <1482464361-4068-1-git-send-email-sergiodj@redhat.com> <20170604221803.17649-1-sergiodj@redhat.com> <20170604221803.17649-4-sergiodj@redhat.com> <2e012ef6-587b-5883-0626-9f6dbb33d60f@redhat.com> <87o9tzo6cr.fsf@redhat.com> <87fufbmole.fsf@redhat.com> <87tw3rl56n.fsf@redhat.com> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/25.2.2 (x86_64-pc-linux-gnu) Date: Thu, 14 Feb 2019 16:37:56 +0100 Message-ID: <87o97eidnv.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Wed, 07 Jun 2017 20:00:00 -0400, Sergio Durigan Junior wrote: > On Wednesday, June 07 2017, Pedro Alves wrote: > > > In the commit log: > > > > On 06/07/2017 11:15 PM, Sergio Durigan Junior wrote: > >> This is the most important (and the biggest, sorry) patch of the > >> series. It moves fork_inferior from gdb/fork-child.c to > >> common/common-fork-child.c and makes all the necessary adjustments to > >> both GDB and gdbserver to make sure everything works OK. > > > > common/common-fork-child.c -> nat/fork-inferior.c > > > > Series is OK. Please push. > > Thanks, pushed. > > aefd8b33d97bded58e51d75271f99e1eaec9fb28 > 2090129c36c7e582943b7d300968d19b46160d84 > 043a49349c713dc329a2dfc413b082c3826ecdb8 > 156525114c1cbbace0dec223494b842ffc60d52e Pushed to master the attached commit 6c6ef69fb4e95d991fa5462d067d3f71a73fedce '[gdb, hurd] Repair build after "Share fork_inferior et al with gdbserver" changes'. Grüße Thomas From 6c6ef69fb4e95d991fa5462d067d3f71a73fedce Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 4 Jul 2018 13:27:09 +0200 Subject: [PATCH] [gdb, hurd] Repair build after "Share fork_inferior et al with gdbserver" changes ..., that is commit 2090129c36c7e582943b7d300968d19b46160d84 causing: [...]/gdb/gnu-nat.c: In function 'void gnu_ptrace_me()': [...]/gdb/gnu-nat.c:2133:5: error: 'trace_start_error_with_name' was not declared in this scope trace_start_error_with_name ("ptrace"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ [...]/gdb/gnu-nat.c:2133:5: note: suggested alternative: 'throw_perror_with_name' trace_start_error_with_name ("ptrace"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ throw_perror_with_name [...]/gdb/gnu-nat.c: In function 'void gnu_create_inferior(target_ops*, const char*, const string&, char**, int)': [...]/gdb/gnu-nat.c:2147:9: error: 'fork_inferior' was not declared in this scope pid = fork_inferior (exec_file, allargs, env, gnu_ptrace_me, ^~~~~~~~~~~~~ [...]/gdb/gnu-nat.c:2147:9: note: suggested alternative: 'exit_inferior' pid = fork_inferior (exec_file, allargs, env, gnu_ptrace_me, ^~~~~~~~~~~~~ exit_inferior [...]/gdb/gnu-nat.c:2174:30: error: 'START_INFERIOR_TRAPS_EXPECTED' was not declared in this scope gdb_startup_inferior (pid, START_INFERIOR_TRAPS_EXPECTED); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/bin/ld: gnu-nat.o: in function `gnu_ptrace_me()': [...]/gdb/gnu-nat.c:2134: undefined reference to `trace_start_error_with_name(char const*)' /usr/bin/ld: gnu-nat.o: in function `gnu_create_inferior(target_ops*, char const*, std::__cxx11::basic_string, std::allocator > const&, char**, int)': [...]/gdb/gnu-nat.c:2148: undefined reference to `fork_inferior(char const*, std::__cxx11::basic_string, std::allocator > const&, char**, void (*)(), void (*)(int), void (*)(), char const*, void (*)(char const*, char* const*, char* const*))' /usr/bin/ld: fork-child.o: in function `gdb_startup_inferior(int, int)': [...]/gdb/fork-child.c:136: undefined reference to `startup_inferior(int, int, target_waitstatus*, ptid_t*)' collect2: error: ld returned 1 exit status gdb/ * configure.nat [gdb_host == i386gnu] (NATDEPFILES): Add 'nat/fork-inferior.o'. * gnu-nat.c: #include "nat/fork-inferior.h". --- gdb/ChangeLog | 4 ++++ gdb/configure.nat | 1 + gdb/gnu-nat.c | 1 + 3 files changed, 6 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fcaae6125e..2974d7275c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2019-02-14 Thomas Schwinge + * configure.nat [gdb_host == i386gnu] (NATDEPFILES): Add + 'nat/fork-inferior.o'. + * gnu-nat.c: #include "nat/fork-inferior.h". + * gnu-nat.c (gnu_nat_target::detach): Instead of 'inf_child_maybe_unpush_target (ops)' call 'maybe_unpush_target'. * gnu-nat.h: #include "inf-child.h". diff --git a/gdb/configure.nat b/gdb/configure.nat index 3118263ac6..64ee101d83 100644 --- a/gdb/configure.nat +++ b/gdb/configure.nat @@ -215,6 +215,7 @@ case ${gdb_host} in # Host: Intel 386 running the GNU Hurd NATDEPFILES='i386-gnu-nat.o gnu-nat.o \ x86-nat.o nat/x86-dregs.o fork-child.o \ + nat/fork-inferior.o \ notify_S.o process_reply_S.o msg_reply_S.o \ msg_U.o exc_request_U.o exc_request_S.o' HAVE_NATIVE_GCORE_HOST=1 diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 78966c805d..5a47cb7d63 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -69,6 +69,7 @@ extern "C" #include "gdbthread.h" #include "gdb_obstack.h" #include "tid-parse.h" +#include "nat/fork-inferior.h" #include "inf-child.h" -- 2.19.2