From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96164 invoked by alias); 24 Jan 2020 15:23:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 96155 invoked by uid 89); 24 Jan 2020 15:23:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mout.gmx.net Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.17.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Jan 2020 15:23:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1579879431; bh=ZMqM7Naxel9pa4GYp5TQS1JmwCtoDo484CuTfRyWQBU=; h=X-UI-Sender-Class:To:Cc:References:From:Subject:Date:In-Reply-To; b=Y0+Oya5D2z9IMsHUK/b1wpkDs9QdGgMPB4rSIK+dp5hxeTf/DXYphM9L85eOBhQCy rEUfChsHrRwgP14aQwDIVBjRbtiKDONIESE0LKkv+lDpprwLu2VKhVm+gclBlW3rQE vqWek6Ygxjo2wDy+gGsv6CIafBeP+2sDluwXoZWI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.0.241] ([89.71.135.231]) by mail.gmx.com (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MN5if-1jDVAI0SaT-00J0Kd; Fri, 24 Jan 2020 16:23:51 +0100 To: Christian Biesinger Cc: gdb-patches References: <20200124141458.171392-3-cbiesinger@chromium.org> <20200124141818.172490-1-cbiesinger@chromium.org> <2afe5687-5be2-7650-d4e3-3aceed3f68f2@gmx.com> From: Kamil Rytarowski Subject: Re: [PATCH 2/3 v2] Define _KMEMUSER in arm-nbsd-nat.c Message-ID: <7432896e-39ec-4a99-cc07-77c684b71644@gmx.com> Date: Fri, 24 Jan 2020 15:36:00 -0000 User-Agent: Mozilla/5.0 (X11; NetBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ge3yXOLSYHjjDsbjK3QkuYEX7l0czeiX7" X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00805.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Ge3yXOLSYHjjDsbjK3QkuYEX7l0czeiX7 Content-Type: multipart/mixed; boundary="6rIyN50srnWB3f11MweF4xd6wH4Zodstx"; protected-headers="v1" From: Kamil Rytarowski To: Christian Biesinger Cc: gdb-patches Message-ID: <7432896e-39ec-4a99-cc07-77c684b71644@gmx.com> Subject: Re: [PATCH 2/3 v2] Define _KMEMUSER in arm-nbsd-nat.c References: <20200124141458.171392-3-cbiesinger@chromium.org> <20200124141818.172490-1-cbiesinger@chromium.org> <2afe5687-5be2-7650-d4e3-3aceed3f68f2@gmx.com> In-Reply-To: --6rIyN50srnWB3f11MweF4xd6wH4Zodstx Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Content-length: 3021 On 24.01.2020 15:53, Christian Biesinger via gdb-patches wrote: > Hi Kamil, >=20 > I have a related question. NetBSD applied this patch: > https://www.mail-archive.com/tech@openbsd.org/msg44100.html >=20 Is this the right link? > Do you know which NetBSD version that shipped in? Can we apply that > patch to GDB as-is or should we attempt to support the older struct > layout as well? Please go for the current FPU layout on NetBSD. Massive ptrace(2) fixes were introduced in NetBSD-8 and later. Soon NetBSD 7.x will go EOL (after releasing 9.0, rc2 is planned soon). In LLDB we support NetBSD 9.0 or newer. In GDB we should keep the same minimal requirements and deal with older NetBSD versions (if at all) with downstream patches. We have got a pile of local GDB patches. There is also a functional gdbserver implementation on NetBSD/amd64 and I intend to upstream it. (Help wanted! Would you be interested in this and in upstreaming?) The patches are located here: https://github.com/NetBSD/pkgsrc-wip/tree/master/gdb-netbsd/patches * with core/basic features... but it is difficult as there is no OS with finished transition... https://sourceware.org/gdb/wiki/LocalRemoteFeatureParity >=20 > Thanks, > Christian >=20 > On Fri, Jan 24, 2020 at 3:29 PM Kamil Rytarowski wrote: >> >> On 24.01.2020 15:18, cbiesinger@chromium.org wrote: >>> From: Christian Biesinger >>> >>> Fixes the below compile error on ARM NetBSD 9.0_RC1 (the only version I >>> tested). types.h does not define register_t by default. >>> >>> We already use this define elsewhere, notably in bsd-kvm.c. >>> >>> In file included from ../../gdb/arm-nbsd-nat.c:28: >>> /usr/include/machine/frame.h:54:2: error: unknown type name 'register_t= '; did you mean '__register_t'? >>> register_t tf_spsr; >>> ^ >>> /usr/include/machine/types.h:77:14: note: '__register_t' declared here >>> typedef int __register_t; >>> ^ >>> >>> There are other compile errors that this does not fix. >>> >>> gdb/ChangeLog: >>> >>> 2020-01-24 Christian Biesinger >>> >>> * arm-nbsd-nat.c: Define _KMEMUSER to get the declaration of >>> register_t. >>> >>> Change-Id: I82c21d38189ee59ea0af2538ba84b771d268722e >>> --- >>> gdb/arm-nbsd-nat.c | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/gdb/arm-nbsd-nat.c b/gdb/arm-nbsd-nat.c >>> index 00f919194b..4844b51a3c 100644 >>> --- a/gdb/arm-nbsd-nat.c >>> +++ b/gdb/arm-nbsd-nat.c >>> @@ -17,6 +17,8 @@ >>> You should have received a copy of the GNU General Public License >>> along with this program. If not, see . */ >>> >>> +/* We define this to get types like register_t. */ >>> +#define _KMEMUSER >>> #include "defs.h" >>> #include "gdbcore.h" >>> #include "inferior.h" >>> >> >> While gdb is the right user for _KMEMUSER, here we should probably go >> for -D_KERNTYPES as it is the canonical symbol for register_t. >> --6rIyN50srnWB3f11MweF4xd6wH4Zodstx-- --Ge3yXOLSYHjjDsbjK3QkuYEX7l0czeiX7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEELaxVpweEzw+lMDwuS7MI6bAudmwFAl4rC8wACgkQS7MI6bAu dmwo3xAArvr9zCXO5DMDAMS2t3iCo8fz9RepLzBmbgryy1Gvvd2lS/T1xxP5l2es lrxec2eX/284ZPdfWk1+YUtH5FsUobfBfSfVgzZ6oFmGoM4TA15KAk0Xx4Omxyg6 WGKnFs05Eub0RqrfyJwOyjYiD/uhJMF4nDLSx5c95p8fmVT13AAUPxEaX1HmYwxG +yfwXQFFdohARyTOGlPTLPpRv7yEDr9ucVgbNPszaIjfFaCqFJ9x8EEcAb/iMXyr xhD8LqcKplROFBHyZjt/nZtJHWeykRH5fQbsIoosyk4xREE3i5zF+GaU5tj2sN6D SH3wzmDs7BufuJVp/lSih2OBcDNRfiX2an6E0N4BnrzVZ4A2HNtgbYLhl0p7CINn 4fBGvsmss/VWk6q/vS1TcXyFC0ZX6ev4RC7pqlFKlBMCBApAzCAQqrxQhNBKzb1x H4Sw6xk3ZFWMTGL+UsjQWY7jwP3MA/2BA1sdcR/szqCz15Q+SN2TZf4KS05kq5C3 UGKCctIMzStl1h1e3QCbwaV54TURjlcTrsbg8mOB7ghW8QhdiH7wBDR0K9ojJJNh cTEyA5KWRhqxESC4MjvABQhVxDURX2hN8ap0VrsyayT3KrhdPUkiF46N6zkoNEFO IkapuKHf5m+10TW4wllqkeUEsxksCgk1ND2FUfvOa125dSeloac= =dP3n -----END PGP SIGNATURE----- --Ge3yXOLSYHjjDsbjK3QkuYEX7l0czeiX7--