From owner-freebsd-arch@freebsd.org Wed Jul 20 19:10:34 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACCE4B9F84F for ; Wed, 20 Jul 2016 19:10:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EEBE178D for ; Wed, 20 Jul 2016 19:10:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 54ED7B94B for ; Wed, 20 Jul 2016 15:10:33 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Subject: Re: Retiring in-tree GDB Date: Wed, 20 Jul 2016 12:00:21 -0700 Message-ID: <4450836.nX37FfBzNy@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <2678091.es0AGJQ0Ou@ralph.baldwin.cx> References: <2678091.es0AGJQ0Ou@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 20 Jul 2016 15:10:33 -0400 (EDT) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2016 19:10:34 -0000 On Tuesday, October 20, 2015 01:36:28 PM John Baldwin wrote: > When this topic was last raised (by Warner I believe), the primary objection > (certainly my main one) was that the in-tree kgdb was the only kernel debugger > available. kgdb is now available via the devel/gdb port in ports (and as of > last week was enabled by default, so 'pkg install gdb' will get you a kgdb > binary). The kgdb in ports is in general superior to the one in the base > system. It is a cross debugger by default (and with my pending patches to > libkvm it even supports cross debugging of vmcores). > > There are some issues still with devel/gdb: namely it does not currently > support some of the platforms supported by our in tree gdb such as arm and > mips. For these platforms I think the in-tree gdb will need to remain until > there is a suitable alternative. > > However, I would like to propose that we retire the in-tree GDB for some of > our platforms (namely x86) for 11. In particular, I think we should default > to enabling lldb and disabling gdb for platforms that meet the following > criteria: > > 1) devel/gdb works including thread and kgdb support > 2) lldb works > > We could perhaps be more aggressive and handle lldb and gdb toggles > independently, but I think we want to ship some sort of userland debugger > out of the box on all of our platforms. The question I think might be if > we end up with platforms where 1) is true but 2) is not (such as powerpc). > > I believe that these conditions are only true for x86 currently. > > Comments? I believe I've fixed the one last thing that was depending on /usr/bin/gdb (crashinfo) to use devel/gdb if it is present. I'd either like to disable the base gdb on amd64 in the next week or so on HEAD, or perhaps if people are really gutsy, disable it for all platforms on HEAD. We still don't have kgdb in ports for non-x86 (though for ppc at least kgdb in ports and base is equally dysfunctional). However, to start with: 1) Does anyone have a reason to keep /usr/bin/gdb on amd64? 2) Does anyone have a reason to keep /usr/bin/gdb on !amd64? -- John Baldwin From owner-freebsd-arch@freebsd.org Wed Jul 20 19:20:40 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB992B9FEE5 for ; Wed, 20 Jul 2016 19:20:40 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C55611AF for ; Wed, 20 Jul 2016 19:20:39 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.0.6] (67-0-51-151.albq.qwest.net [67.0.51.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 317ED1928BE for ; Wed, 20 Jul 2016 19:20:39 +0000 (UTC) Subject: Re: Retiring in-tree GDB To: freebsd-arch@freebsd.org References: <2678091.es0AGJQ0Ou@ralph.baldwin.cx> <4450836.nX37FfBzNy@ralph.baldwin.cx> From: Sean Bruno Message-ID: <068a0167-1d5d-a437-60e7-b74e407060a2@freebsd.org> Date: Wed, 20 Jul 2016 13:20:34 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <4450836.nX37FfBzNy@ralph.baldwin.cx> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aI7mpvAB0X4IPKEEpRF875lvlwuTK733L" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2016 19:20:40 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --aI7mpvAB0X4IPKEEpRF875lvlwuTK733L Content-Type: multipart/mixed; boundary="606I5uSIhQo9dBDFkknnjGN21PWU6vf6w" From: Sean Bruno To: freebsd-arch@freebsd.org Message-ID: <068a0167-1d5d-a437-60e7-b74e407060a2@freebsd.org> Subject: Re: Retiring in-tree GDB References: <2678091.es0AGJQ0Ou@ralph.baldwin.cx> <4450836.nX37FfBzNy@ralph.baldwin.cx> In-Reply-To: <4450836.nX37FfBzNy@ralph.baldwin.cx> --606I5uSIhQo9dBDFkknnjGN21PWU6vf6w Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 07/20/16 13:00, John Baldwin wrote: > On Tuesday, October 20, 2015 01:36:28 PM John Baldwin wrote: >> When this topic was last raised (by Warner I believe), the primary obj= ection >> (certainly my main one) was that the in-tree kgdb was the only kernel = debugger >> available. kgdb is now available via the devel/gdb port in ports (and= as of >> last week was enabled by default, so 'pkg install gdb' will get you a = kgdb >> binary). The kgdb in ports is in general superior to the one in the b= ase >> system. It is a cross debugger by default (and with my pending patche= s to >> libkvm it even supports cross debugging of vmcores). >> >> There are some issues still with devel/gdb: namely it does not current= ly >> support some of the platforms supported by our in tree gdb such as arm= and >> mips. For these platforms I think the in-tree gdb will need to remain= until >> there is a suitable alternative. >> >> However, I would like to propose that we retire the in-tree GDB for so= me of >> our platforms (namely x86) for 11. In particular, I think we should d= efault >> to enabling lldb and disabling gdb for platforms that meet the followi= ng >> criteria: >> >> 1) devel/gdb works including thread and kgdb support >> 2) lldb works >> >> We could perhaps be more aggressive and handle lldb and gdb toggles >> independently, but I think we want to ship some sort of userland debug= ger >> out of the box on all of our platforms. The question I think might be= if >> we end up with platforms where 1) is true but 2) is not (such as power= pc). >> >> I believe that these conditions are only true for x86 currently. >> >> Comments? >=20 > I believe I've fixed the one last thing that was depending on /usr/bin/= gdb > (crashinfo) to use devel/gdb if it is present. I'd either like to disa= ble > the base gdb on amd64 in the next week or so on HEAD, or perhaps if peo= ple are > really gutsy, disable it for all platforms on HEAD. We still don't hav= e kgdb > in ports for non-x86 (though for ppc at least kgdb in ports and base is= > equally dysfunctional). >=20 > However, to start with: >=20 > 1) Does anyone have a reason to keep /usr/bin/gdb on amd64? >=20 > 2) Does anyone have a reason to keep /usr/bin/gdb on !amd64? >=20 I don't have an immediate use case in the mips/mips64 case. Should ports "just work" here or do I need some kind of "cross gdb"? sean --606I5uSIhQo9dBDFkknnjGN21PWU6vf6w-- --aI7mpvAB0X4IPKEEpRF875lvlwuTK733L Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJXj88DXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5keqwIAKjBGgG6sWBUabHYuWd/pW0V B2mMSQpGIkwHfhoCTzAI4YJ2pxpOZDvmCcJ1Lan0FC7YiBuxzJad3RKzVgsFVx8M 12TOC3dEuqhgcrr7fa73ZbSl+HpSca+1qRnBzNZ9pq9X0PaNh1o/G4pPm20pWvWD I7x/guxZpHQBI1w4VgVgNCCOYqFJXo7RkZejlvGY8Bd+FoXa2bdxiQZr9IDVTku7 54obHSZabDce+BPd6IbIJDT1VSgEmAqOHCtwwPvfcCiN9Lftv3adEIve/W1Uhay2 fPRGupKrQ8b50KIFfXUJu30lV5lPoK6njQ6d60lRBs2YKUSI+d5xsQybH2nGB24= =DUr8 -----END PGP SIGNATURE----- --aI7mpvAB0X4IPKEEpRF875lvlwuTK733L-- From owner-freebsd-arch@freebsd.org Wed Jul 20 20:19:51 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB6B0B9F50B for ; Wed, 20 Jul 2016 20:19:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC77412F6; Wed, 20 Jul 2016 20:19:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7AF52B923; Wed, 20 Jul 2016 16:19:50 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Cc: Sean Bruno Subject: Re: Retiring in-tree GDB Date: Wed, 20 Jul 2016 13:19:46 -0700 Message-ID: <3871457.xzmrTRH8AM@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <068a0167-1d5d-a437-60e7-b74e407060a2@freebsd.org> References: <2678091.es0AGJQ0Ou@ralph.baldwin.cx> <4450836.nX37FfBzNy@ralph.baldwin.cx> <068a0167-1d5d-a437-60e7-b74e407060a2@freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 20 Jul 2016 16:19:50 -0400 (EDT) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2016 20:19:51 -0000 On Wednesday, July 20, 2016 01:20:34 PM Sean Bruno wrote: > > On 07/20/16 13:00, John Baldwin wrote: > > On Tuesday, October 20, 2015 01:36:28 PM John Baldwin wrote: > >> When this topic was last raised (by Warner I believe), the primary objection > >> (certainly my main one) was that the in-tree kgdb was the only kernel debugger > >> available. kgdb is now available via the devel/gdb port in ports (and as of > >> last week was enabled by default, so 'pkg install gdb' will get you a kgdb > >> binary). The kgdb in ports is in general superior to the one in the base > >> system. It is a cross debugger by default (and with my pending patches to > >> libkvm it even supports cross debugging of vmcores). > >> > >> There are some issues still with devel/gdb: namely it does not currently > >> support some of the platforms supported by our in tree gdb such as arm and > >> mips. For these platforms I think the in-tree gdb will need to remain until > >> there is a suitable alternative. > >> > >> However, I would like to propose that we retire the in-tree GDB for some of > >> our platforms (namely x86) for 11. In particular, I think we should default > >> to enabling lldb and disabling gdb for platforms that meet the following > >> criteria: > >> > >> 1) devel/gdb works including thread and kgdb support > >> 2) lldb works > >> > >> We could perhaps be more aggressive and handle lldb and gdb toggles > >> independently, but I think we want to ship some sort of userland debugger > >> out of the box on all of our platforms. The question I think might be if > >> we end up with platforms where 1) is true but 2) is not (such as powerpc). > >> > >> I believe that these conditions are only true for x86 currently. > >> > >> Comments? > > > > I believe I've fixed the one last thing that was depending on /usr/bin/gdb > > (crashinfo) to use devel/gdb if it is present. I'd either like to disable > > the base gdb on amd64 in the next week or so on HEAD, or perhaps if people are > > really gutsy, disable it for all platforms on HEAD. We still don't have kgdb > > in ports for non-x86 (though for ppc at least kgdb in ports and base is > > equally dysfunctional). > > > > However, to start with: > > > > 1) Does anyone have a reason to keep /usr/bin/gdb on amd64? > > > > 2) Does anyone have a reason to keep /usr/bin/gdb on !amd64? > > > > I don't have an immediate use case in the mips/mips64 case. Should > ports "just work" here or do I need some kind of "cross gdb"? ports gdb does not yet work on mips. Once it supports mips it will work as both a native and cross debugger, but it just doesn't know about FreeBSD/mips at all. Does /usr/bin/gdb work on mips? -- John Baldwin From owner-freebsd-arch@freebsd.org Wed Jul 20 20:39:58 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFBE3B9FDAC for ; Wed, 20 Jul 2016 20:39:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B92A712B7 for ; Wed, 20 Jul 2016 20:39:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-pa0-x22c.google.com with SMTP id ks6so21560692pab.0 for ; Wed, 20 Jul 2016 13:39:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=tFz+5gAXT7BkGFEUoedvCu/toykDDeQoeAX4wzCuUQM=; b=B2C00QNkPwaeXhg1DkhzEqdREan1bIN/GAnOUf9Z53ZlOND47k1mPaHmCoJdj+7UbE aA4gKrVTaRjAu2XBgiHPdtgAj4kk3mwDvLLbgrNR5QECEiRfRfEkVXihC2PdMrmc35Tl 33BZk3Kp8ZkBnmAxHAahVie9ezbqCSmBcZTcbb0taxqrTAiXA03zgkr5+lI3nk0nyysf 0L+BBRTFsKMFUP7/ogqjh3G32KTIPkSQdnzr+Kp22v0jVR2NVLsNWx9KD39Y0vkmVPbR UCfUWugSmXzeE2P7Ub/QvMtuPex81LyXNNvqL28BuE0A3wYD0YeMjn5Os3cT8KU8U/C/ pp/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=tFz+5gAXT7BkGFEUoedvCu/toykDDeQoeAX4wzCuUQM=; b=LYeJzxpcqKDPZHX2Xb1uQ/AWsU56VGgxuMvkJy8TVrAS1cVee2AmPfGmQ6xl2bJsgu IOUSYHaaSGc/FTrKcPpAdhmPQrBwPPent2H3obaaMwV7gzkCo/RIxzxke4Fip+k7QEXF 9LLol6sN9Nd+oO6j+WTfkYWlYvJTKKrO7VlwjzqJnAC2OZ/K/iRHoz2fyRx9jg9xCRik KethxA/3DcszwFR0N0thAPaPzuRA0tYzd647nzAkWd8CZvq5y8Z5qiUwb5dhZoNlA96X 7wv9cZn4dEZ3XB09GmGcuzx0TsozR/HUOLg0Cpz1D08I16vlA8vnVknglQH+JTV+22qP JZxw== X-Gm-Message-State: ALyK8tLqvuSHS1OrceIoztfE2HIQxF6mwLpAIkDEct8+B8Qx1w5vLa6YUNT2aYwYUm70TQ== X-Received: by 10.66.25.171 with SMTP id d11mr77393820pag.3.1469047198076; Wed, 20 Jul 2016 13:39:58 -0700 (PDT) Received: from [100.127.70.152] ([69.53.245.200]) by smtp.gmail.com with ESMTPSA id f3sm6642011pff.26.2016.07.20.13.39.57 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Jul 2016 13:39:57 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Retiring in-tree GDB From: Warner Losh In-Reply-To: <3871457.xzmrTRH8AM@ralph.baldwin.cx> Date: Wed, 20 Jul 2016 14:39:55 -0600 Cc: freebsd-arch@freebsd.org, Sean Bruno Content-Transfer-Encoding: quoted-printable Message-Id: References: <2678091.es0AGJQ0Ou@ralph.baldwin.cx> <4450836.nX37FfBzNy@ralph.baldwin.cx> <068a0167-1d5d-a437-60e7-b74e407060a2@freebsd.org> <3871457.xzmrTRH8AM@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2016 20:39:59 -0000 > On Jul 20, 2016, at 2:19 PM, John Baldwin wrote: >=20 > On Wednesday, July 20, 2016 01:20:34 PM Sean Bruno wrote: >>=20 >> On 07/20/16 13:00, John Baldwin wrote: >>> On Tuesday, October 20, 2015 01:36:28 PM John Baldwin wrote: >>>> When this topic was last raised (by Warner I believe), the primary = objection >>>> (certainly my main one) was that the in-tree kgdb was the only = kernel debugger >>>> available. kgdb is now available via the devel/gdb port in ports = (and as of >>>> last week was enabled by default, so 'pkg install gdb' will get you = a kgdb >>>> binary). The kgdb in ports is in general superior to the one in = the base >>>> system. It is a cross debugger by default (and with my pending = patches to >>>> libkvm it even supports cross debugging of vmcores). >>>>=20 >>>> There are some issues still with devel/gdb: namely it does not = currently >>>> support some of the platforms supported by our in tree gdb such as = arm and >>>> mips. For these platforms I think the in-tree gdb will need to = remain until >>>> there is a suitable alternative. >>>>=20 >>>> However, I would like to propose that we retire the in-tree GDB for = some of >>>> our platforms (namely x86) for 11. In particular, I think we = should default >>>> to enabling lldb and disabling gdb for platforms that meet the = following >>>> criteria: >>>>=20 >>>> 1) devel/gdb works including thread and kgdb support >>>> 2) lldb works >>>>=20 >>>> We could perhaps be more aggressive and handle lldb and gdb toggles >>>> independently, but I think we want to ship some sort of userland = debugger >>>> out of the box on all of our platforms. The question I think might = be if >>>> we end up with platforms where 1) is true but 2) is not (such as = powerpc). >>>>=20 >>>> I believe that these conditions are only true for x86 currently. >>>>=20 >>>> Comments? >>>=20 >>> I believe I've fixed the one last thing that was depending on = /usr/bin/gdb >>> (crashinfo) to use devel/gdb if it is present. I'd either like to = disable >>> the base gdb on amd64 in the next week or so on HEAD, or perhaps if = people are >>> really gutsy, disable it for all platforms on HEAD. We still don't = have kgdb >>> in ports for non-x86 (though for ppc at least kgdb in ports and base = is >>> equally dysfunctional). >>>=20 >>> However, to start with: >>>=20 >>> 1) Does anyone have a reason to keep /usr/bin/gdb on amd64? >>>=20 >>> 2) Does anyone have a reason to keep /usr/bin/gdb on !amd64? >>>=20 >>=20 >> I don't have an immediate use case in the mips/mips64 case. Should >> ports "just work" here or do I need some kind of "cross gdb"? >=20 > ports gdb does not yet work on mips. Once it supports mips it will = work as > both a native and cross debugger, but it just doesn't know about = FreeBSD/mips > at all. Does /usr/bin/gdb work on mips? It does, kinda. there=E2=80=99s a lot of stuff it gets right, so it can = be useful. However, there=E2=80=99s enough wrong that it=E2=80=99s super frustrating. So = there=E2=80=99s a low bar to replacement. If I can build a new /bin/cat and debug it with a ports = gdb, even if things are broken that kinda work now, I=E2=80=99m all for = replacement. If /usr/bin/gdb were super duper cool on mips, I=E2=80=99d have a = different take, but gdb on mips has never been stellar. Warner= From owner-freebsd-arch@freebsd.org Wed Jul 20 21:40:54 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C70AB9F153 for ; Wed, 20 Jul 2016 21:40:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB8D21726; Wed, 20 Jul 2016 21:40:53 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B8189B923; Wed, 20 Jul 2016 17:40:52 -0400 (EDT) From: John Baldwin To: Warner Losh Cc: freebsd-arch@freebsd.org, Sean Bruno Subject: Re: Retiring in-tree GDB Date: Wed, 20 Jul 2016 14:30:01 -0700 Message-ID: <2386413.0UUCRd2KC2@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: References: <2678091.es0AGJQ0Ou@ralph.baldwin.cx> <3871457.xzmrTRH8AM@ralph.baldwin.cx> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 20 Jul 2016 17:40:52 -0400 (EDT) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2016 21:40:54 -0000 On Wednesday, July 20, 2016 02:39:55 PM Warner Losh wrote: >=20 > > On Jul 20, 2016, at 2:19 PM, John Baldwin wrote: > >=20 > > On Wednesday, July 20, 2016 01:20:34 PM Sean Bruno wrote: > >>=20 > >> On 07/20/16 13:00, John Baldwin wrote: > >>> On Tuesday, October 20, 2015 01:36:28 PM John Baldwin wrote: > >>>> When this topic was last raised (by Warner I believe), the prima= ry objection > >>>> (certainly my main one) was that the in-tree kgdb was the only k= ernel debugger > >>>> available. kgdb is now available via the devel/gdb port in port= s (and as of > >>>> last week was enabled by default, so 'pkg install gdb' will get = you a kgdb > >>>> binary). The kgdb in ports is in general superior to the one in= the base > >>>> system. It is a cross debugger by default (and with my pending = patches to > >>>> libkvm it even supports cross debugging of vmcores). > >>>>=20 > >>>> There are some issues still with devel/gdb: namely it does not c= urrently > >>>> support some of the platforms supported by our in tree gdb such = as arm and > >>>> mips. For these platforms I think the in-tree gdb will need to = remain until > >>>> there is a suitable alternative. > >>>>=20 > >>>> However, I would like to propose that we retire the in-tree GDB = for some of > >>>> our platforms (namely x86) for 11. In particular, I think we sh= ould default > >>>> to enabling lldb and disabling gdb for platforms that meet the f= ollowing > >>>> criteria: > >>>>=20 > >>>> 1) devel/gdb works including thread and kgdb support > >>>> 2) lldb works > >>>>=20 > >>>> We could perhaps be more aggressive and handle lldb and gdb togg= les > >>>> independently, but I think we want to ship some sort of userland= debugger > >>>> out of the box on all of our platforms. The question I think mi= ght be if > >>>> we end up with platforms where 1) is true but 2) is not (such as= powerpc). > >>>>=20 > >>>> I believe that these conditions are only true for x86 currently.= > >>>>=20 > >>>> Comments? > >>>=20 > >>> I believe I've fixed the one last thing that was depending on /us= r/bin/gdb > >>> (crashinfo) to use devel/gdb if it is present. I'd either like t= o disable > >>> the base gdb on amd64 in the next week or so on HEAD, or perhaps = if people are > >>> really gutsy, disable it for all platforms on HEAD. We still don= 't have kgdb > >>> in ports for non-x86 (though for ppc at least kgdb in ports and b= ase is > >>> equally dysfunctional). > >>>=20 > >>> However, to start with: > >>>=20 > >>> 1) Does anyone have a reason to keep /usr/bin/gdb on amd64? > >>>=20 > >>> 2) Does anyone have a reason to keep /usr/bin/gdb on !amd64? > >>>=20 > >>=20 > >> I don't have an immediate use case in the mips/mips64 case. Shoul= d > >> ports "just work" here or do I need some kind of "cross gdb"? > >=20 > > ports gdb does not yet work on mips. Once it supports mips it will= work as > > both a native and cross debugger, but it just doesn't know about Fr= eeBSD/mips > > at all. Does /usr/bin/gdb work on mips? >=20 > It does, kinda. there=E2=80=99s a lot of stuff it gets right, so it c= an be useful. However, > there=E2=80=99s enough wrong that it=E2=80=99s super frustrating. So = there=E2=80=99s a low bar to > replacement. If I can build a new /bin/cat and debug it with a ports = gdb, > even if things are broken that kinda work now, I=E2=80=99m all for re= placement. >=20 > If /usr/bin/gdb were super duper cool on mips, I=E2=80=99d have a dif= ferent take, but > gdb on mips has never been stellar. Well, devel/gdb won't work at all on mips, so if we removed /usr/bin/gd= b on all platforms you'd be left with no debugger at all. Starting with amd64 i= s probably the most prudent for now. i386 is probably also a good candidate even = without working lldb. --=20 John Baldwin From owner-freebsd-arch@freebsd.org Wed Jul 20 21:47:56 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75DD9B9F417 for ; Wed, 20 Jul 2016 21:47:56 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 405AF1D1F; Wed, 20 Jul 2016 21:47:56 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x22c.google.com with SMTP id m101so59691358ioi.2; Wed, 20 Jul 2016 14:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=G0kFlX7Sz78hD5zjDua+X/qG23IN3y1jXzIlz5e1J+M=; b=NdkRkHUiCd/sgN/5oM7EtlUxoAbHp8yyEYZrPyODInDPCdJUVseHmkTwKLRcAPg4Af a4xrVLfQB3p9BYpqUVtMGU0UK85lYcAE3g/5FnHx7O/67anLTo4Dc3IZrqbWqzOfuwsl 2eeKNcoXkob5ZMAvyVqN77L4Ucwr2iw5kUuSOPedUQ1dh9OyMaJtRnUsG1z6zFGlrtZS qYOuBBTKmECqR5+l1bfX22GOykExHLjxSBucJX/D4T0ui87jyZW+Y/1cLGnAqmkCPUZl mDUYcr6dDrl85Q7fsmhtg51Dg7ZngM13mmgfH2fViPrtszs2yT6RY61oigPQoNcVvxp2 oHZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=G0kFlX7Sz78hD5zjDua+X/qG23IN3y1jXzIlz5e1J+M=; b=asdszqwbL2EMm4WH+oUOYoWA/91ObTTjZraAYc8GaJYn/Bk00KKwF6FOFx1ulMI/Gp lvM0gFp3yz9gnD7irBgcdttv6VQL4yRzE2usASr4rlYH+ajrTi0Py7MWpnBw2zrB++p3 By+Kkqmu+Gljl2WMU7iHzQl/0DMqdsUXd8ittS4tT2J1HCqlBK7ozo2X+rGxKUO2Wh7Q i24wJUmwNYQEAGxM9DzKi8U+/MWcpOIXmdaGTfKBltKythrQtshoYLrvbDCBYodL55Y+ T+85dNawljOLEQtvXhfMWMLwS0hTnUbIA0WhnUy1/8iV7hV4YFA8p+Ja1eE90b1cLBXG d/Nw== X-Gm-Message-State: ALyK8tJHgtR93HyXAADQmCRqUpB1XQo7L8yAZadFPqb0tal/6qFedyfg4PL9i2v2t+zFL+/19rJszLTNpV3AHw== X-Received: by 10.107.144.10 with SMTP id s10mr45048053iod.165.1469051275650; Wed, 20 Jul 2016 14:47:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.141.129 with HTTP; Wed, 20 Jul 2016 14:47:54 -0700 (PDT) In-Reply-To: <2386413.0UUCRd2KC2@ralph.baldwin.cx> References: <2678091.es0AGJQ0Ou@ralph.baldwin.cx> <3871457.xzmrTRH8AM@ralph.baldwin.cx> <2386413.0UUCRd2KC2@ralph.baldwin.cx> From: Adrian Chadd Date: Wed, 20 Jul 2016 14:47:54 -0700 Message-ID: Subject: Re: Retiring in-tree GDB To: John Baldwin Cc: Warner Losh , Sean Bruno , "freebsd-arch@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2016 21:47:56 -0000 Hi, We're missing a bunch of mips trapframe/etc handling code in the upstream gdb for freebsd/mips. There's freebsd/alpha upstream, but not mips. i use the gdb in a qemu VM to diagnose freebsd/mips related issues. I'm mainly afraid of having no sensible replacement - we can't (yet) cross compile gdb easily for mips, we can't (yet) easily cross compile a gdb /stub/ to remote debug mips, and upstream gdb / our port doesn't support freebsd/mips. If someone gdb cluey could pull out the freebsd/mips specific gdb code and at least get it into the port as a set of patches, that'd be a great start. I'm happy to try and work with others to get that patchset upstreamed into gdb (once I finally sign the FSF documentation, sigh.) Thanks, -adrian From owner-freebsd-arch@freebsd.org Thu Jul 21 09:26:44 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1961DB9F278 for ; Thu, 21 Jul 2016 09:26:44 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D50471FA3; Thu, 21 Jul 2016 09:26:43 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1bQAFX-000PbY-4e; Thu, 21 Jul 2016 12:26:35 +0300 Date: Thu, 21 Jul 2016 12:26:35 +0300 From: Slawa Olhovchenkov To: John Baldwin Cc: freebsd-arch@freebsd.org Subject: Re: Retiring in-tree GDB Message-ID: <20160721092635.GN20831@zxy.spb.ru> References: <2678091.es0AGJQ0Ou@ralph.baldwin.cx> <4450836.nX37FfBzNy@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4450836.nX37FfBzNy@ralph.baldwin.cx> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2016 09:26:44 -0000 On Wed, Jul 20, 2016 at 12:00:21PM -0700, John Baldwin wrote: > On Tuesday, October 20, 2015 01:36:28 PM John Baldwin wrote: > > When this topic was last raised (by Warner I believe), the primary objection > > (certainly my main one) was that the in-tree kgdb was the only kernel debugger > > available. kgdb is now available via the devel/gdb port in ports (and as of > > last week was enabled by default, so 'pkg install gdb' will get you a kgdb > > binary). The kgdb in ports is in general superior to the one in the base > > system. It is a cross debugger by default (and with my pending patches to > > libkvm it even supports cross debugging of vmcores). > > > > There are some issues still with devel/gdb: namely it does not currently > > support some of the platforms supported by our in tree gdb such as arm and > > mips. For these platforms I think the in-tree gdb will need to remain until > > there is a suitable alternative. > > > > However, I would like to propose that we retire the in-tree GDB for some of > > our platforms (namely x86) for 11. In particular, I think we should default > > to enabling lldb and disabling gdb for platforms that meet the following > > criteria: > > > > 1) devel/gdb works including thread and kgdb support > > 2) lldb works > > > > We could perhaps be more aggressive and handle lldb and gdb toggles > > independently, but I think we want to ship some sort of userland debugger > > out of the box on all of our platforms. The question I think might be if > > we end up with platforms where 1) is true but 2) is not (such as powerpc). > > > > I believe that these conditions are only true for x86 currently. > > > > Comments? > > I believe I've fixed the one last thing that was depending on /usr/bin/gdb > (crashinfo) to use devel/gdb if it is present. I'd either like to disable > the base gdb on amd64 in the next week or so on HEAD, or perhaps if people are > really gutsy, disable it for all platforms on HEAD. We still don't have kgdb > in ports for non-x86 (though for ppc at least kgdb in ports and base is > equally dysfunctional). > > However, to start with: > > 1) Does anyone have a reason to keep /usr/bin/gdb on amd64? > > 2) Does anyone have a reason to keep /usr/bin/gdb on !amd64? lldb replace /usr/bin/gdb? lldb still bundled with base system? From owner-freebsd-arch@freebsd.org Thu Jul 21 16:01:22 2016 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4F8ABA075F for ; Thu, 21 Jul 2016 16:01:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92C0B161D for ; Thu, 21 Jul 2016 16:01:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A9ABAB985; Thu, 21 Jul 2016 12:01:21 -0400 (EDT) From: John Baldwin To: Slawa Olhovchenkov Cc: freebsd-arch@freebsd.org Subject: Re: Retiring in-tree GDB Date: Thu, 21 Jul 2016 08:50:38 -0700 Message-ID: <1551095.z6OxMBXrR7@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <20160721092635.GN20831@zxy.spb.ru> References: <2678091.es0AGJQ0Ou@ralph.baldwin.cx> <4450836.nX37FfBzNy@ralph.baldwin.cx> <20160721092635.GN20831@zxy.spb.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 21 Jul 2016 12:01:21 -0400 (EDT) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2016 16:01:22 -0000 On Thursday, July 21, 2016 12:26:35 PM Slawa Olhovchenkov wrote: > On Wed, Jul 20, 2016 at 12:00:21PM -0700, John Baldwin wrote: > > > On Tuesday, October 20, 2015 01:36:28 PM John Baldwin wrote: > > > When this topic was last raised (by Warner I believe), the primary objection > > > (certainly my main one) was that the in-tree kgdb was the only kernel debugger > > > available. kgdb is now available via the devel/gdb port in ports (and as of > > > last week was enabled by default, so 'pkg install gdb' will get you a kgdb > > > binary). The kgdb in ports is in general superior to the one in the base > > > system. It is a cross debugger by default (and with my pending patches to > > > libkvm it even supports cross debugging of vmcores). > > > > > > There are some issues still with devel/gdb: namely it does not currently > > > support some of the platforms supported by our in tree gdb such as arm and > > > mips. For these platforms I think the in-tree gdb will need to remain until > > > there is a suitable alternative. > > > > > > However, I would like to propose that we retire the in-tree GDB for some of > > > our platforms (namely x86) for 11. In particular, I think we should default > > > to enabling lldb and disabling gdb for platforms that meet the following > > > criteria: > > > > > > 1) devel/gdb works including thread and kgdb support > > > 2) lldb works > > > > > > We could perhaps be more aggressive and handle lldb and gdb toggles > > > independently, but I think we want to ship some sort of userland debugger > > > out of the box on all of our platforms. The question I think might be if > > > we end up with platforms where 1) is true but 2) is not (such as powerpc). > > > > > > I believe that these conditions are only true for x86 currently. > > > > > > Comments? > > > > I believe I've fixed the one last thing that was depending on /usr/bin/gdb > > (crashinfo) to use devel/gdb if it is present. I'd either like to disable > > the base gdb on amd64 in the next week or so on HEAD, or perhaps if people are > > really gutsy, disable it for all platforms on HEAD. We still don't have kgdb > > in ports for non-x86 (though for ppc at least kgdb in ports and base is > > equally dysfunctional). > > > > However, to start with: > > > > 1) Does anyone have a reason to keep /usr/bin/gdb on amd64? > > > > 2) Does anyone have a reason to keep /usr/bin/gdb on !amd64? > > lldb replace /usr/bin/gdb? > lldb still bundled with base system? lldb is bundled on amd64 and arm. It does not include anything equivalent to kgdb (yet), but you are also much better off using kgdb from ports anyway. -- John Baldwin