From patchwork Thu Feb 14 16:34:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 31475 Received: (qmail 14397 invoked by alias); 14 Feb 2019 16:34:42 -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 14387 invoked by uid 89); 14 Feb 2019 16:34:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=winter, Winter, odd 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 16:34:39 +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 1guJy8-0004BU-0C from Thomas_Schwinge@mentor.com ; Thu, 14 Feb 2019 08:34:36 -0800 Received: from svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) 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 08:34:33 -0800 Received: from tftp-cs (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server id 15.0.1320.4 via Frontend Transport; Thu, 14 Feb 2019 08:34:33 -0800 Received: by tftp-cs (Postfix, from userid 49978) id 3D92EC2320; Thu, 14 Feb 2019 08:34:33 -0800 (PST) From: Thomas Schwinge To: CC: , Samuel Thibault , Justus Winter , David Michael Subject: [gdb, hurd] Adjust to Hurd "proc" interface changes (was: proc_task2proc prototype change) In-Reply-To: <87mv9lsj9v.fsf@europa.jade-hamburg.de> References: <20170507134237.d35x6vs7volchmhq@var.youpi.perso.aquilenet.fr> <8737cgbrmn.fsf@thinkbox.jade-hamburg.de> <20170507164721.mdmjxf2ckdii2td3@var.youpi.perso.aquilenet.fr> <87tw4utp1g.fsf@europa.jade-hamburg.de> <20170522221859.ckwvzxljbg3c5eh7@var.youpi.perso.aquilenet.fr> <87inka33bl.fsf@europa.jade-hamburg.de> <20170827184102.fddwriwehw6kwpv7@var.youpi.perso.aquilenet.fr> <87mv9lsj9v.fsf@europa.jade-hamburg.de> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/25.2.2 (x86_64-pc-linux-gnu) Date: Thu, 14 Feb 2019 17:34:26 +0100 Message-ID: <87ef8aib1p.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Tue, 06 Jun 2017 08:49:16 +0200, Justus Winter wrote: > David Michael writes: > > On Mon, Jun 5, 2017 at 7:40 AM, Justus Winter wrote: > >> [...] > > The reply > > functions still have mach_port_poly_t, though, and they are used by > > GDB. Is that correct? > > Oh wow, a server for the reply part of a protocol. Odd. Well, I > decided not to revert the change to the reply part so that it is > consistent with how the reply of a server for the full protocol works. > > > It will require something like the following to get GDB to compile due > > to the changed generated definitions. > > [...] > > ILL_RPC (S_proc_getmsgport_reply, > > mach_port_t reply_port, kern_return_t return_code, > > - mach_port_t msgports) > > + mach_port_t msgports, mach_msg_type_name_t msgportsPoly) ACK, thanks; I pushed to GDB master the attached commit 8071c5ce78245eff43f9977a7c3ff8328f7486da '[gdb, hurd] Adjust to Hurd "proc" interface changes'. > Well, seeing that ILL_RPC is for unused procedures, it would be much > easier to use MIGs "new" way of creating default server stubs that > return a fixed value. This can be done by #defining MIG_EOPNOTSUPP to > some value while compiling the MIG-generated server stub. Being a > simpleroutine it doesn't really matter to what value, but EOPNOTSUPP > seems to be a better choice than ILL_RPC's 0. Thanks, we shall look into that later. Grüße Thomas From 8071c5ce78245eff43f9977a7c3ff8328f7486da Mon Sep 17 00:00:00 2001 From: David Michael Date: Mon, 5 Jun 2017 17:35:11 -0700 Subject: [PATCH] [gdb, hurd] Adjust to Hurd "proc" interface changes Hurd's commit baf7e5c8ce176aead15c2559952d8bdf0da41ffd "hurd: Use polymorphic port types to return some rights" causes in the GDB build: /usr/bin/ld: process_reply_S.o: in function `_Xproc_pid2proc_reply': [...]/gdb/process_reply_S.c:754: undefined reference to `S_proc_pid2proc_reply' /usr/bin/ld: [...]/gdb/process_reply_S.c:730: undefined reference to `S_proc_pid2proc_reply' /usr/bin/ld: process_reply_S.o: in function `_Xproc_task2proc_reply': [...]/gdb/process_reply_S.c:589: undefined reference to `S_proc_task2proc_reply' /usr/bin/ld: [...]/gdb/process_reply_S.c:565: undefined reference to `S_proc_task2proc_reply' /usr/bin/ld: process_reply_S.o: in function `_Xproc_getmsgport_reply': [...]/gdb/process_reply_S.c:204: undefined reference to `S_proc_getmsgport_reply' /usr/bin/ld: [...]/gdb/process_reply_S.c:180: undefined reference to `S_proc_getmsgport_reply' collect2: error: ld returned 1 exit status gdb/ * gnu-nat.c (S_proc_getmsgport_reply, S_proc_task2proc_reply) (S_proc_pid2proc_reply): Adjust to Hurd "proc" interface changes. --- gdb/ChangeLog | 7 +++++++ gdb/gnu-nat.c | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e427dda8a3..f2bbd77558 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2019-02-14 David Michael + Samuel Thibault + Thomas Schwinge + + * gnu-nat.c (S_proc_getmsgport_reply, S_proc_task2proc_reply) + (S_proc_pid2proc_reply): Adjust to Hurd "proc" interface changes. + 2019-02-14 Thomas Schwinge * gnu-nat.c (gnu_write_inferior, parse_int_arg, _parse_bool_arg) diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 395b456ad7..53f23068a4 100644 --- a/gdb/gnu-nat.c +++ b/gdb/gnu-nat.c @@ -1880,17 +1880,19 @@ ILL_RPC (S_proc_setmsgport_reply, mach_port_t oldmsgport) ILL_RPC (S_proc_getmsgport_reply, mach_port_t reply_port, kern_return_t return_code, - mach_port_t msgports) + mach_port_t msgports, mach_msg_type_name_t msgportsPoly) ILL_RPC (S_proc_pid2task_reply, mach_port_t reply_port, kern_return_t return_code, mach_port_t task) ILL_RPC (S_proc_task2pid_reply, mach_port_t reply_port, kern_return_t return_code, pid_t pid) ILL_RPC (S_proc_task2proc_reply, - mach_port_t reply_port, kern_return_t return_code, mach_port_t proc) + mach_port_t reply_port, kern_return_t return_code, + mach_port_t proc, mach_msg_type_name_t procPoly) ILL_RPC (S_proc_proc2task_reply, mach_port_t reply_port, kern_return_t return_code, mach_port_t task) ILL_RPC (S_proc_pid2proc_reply, - mach_port_t reply_port, kern_return_t return_code, mach_port_t proc) + mach_port_t reply_port, kern_return_t return_code, + mach_port_t proc, mach_msg_type_name_t procPoly) ILL_RPC (S_proc_getprocinfo_reply, mach_port_t reply_port, kern_return_t return_code, int flags, procinfo_t procinfo, mach_msg_type_number_t procinfoCnt, -- 2.19.2