From owner-freebsd-ports@freebsd.org Wed Oct 18 07:52:41 2017 Return-Path: Delivered-To: freebsd-ports@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 1E0F9E2F27D for ; Wed, 18 Oct 2017 07:52:41 +0000 (UTC) (envelope-from pkubaj@anongoth.pl) Received: from mail.anongoth.pl (mail.anongoth.pl [46.248.190.61]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "anongoth.pl", Issuer "Fake LE Intermediate X1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9E9236F0A8; Wed, 18 Oct 2017 07:52:39 +0000 (UTC) (envelope-from pkubaj@anongoth.pl) Received: from anongoth.pl (unknown [10.10.0.70]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: pkubaj@anongoth.pl) by mail.anongoth.pl (Postfix) with ESMTPSA id 768F74D6F2; Wed, 18 Oct 2017 09:52:34 +0200 (CEST) Date: Wed, 18 Oct 2017 09:52:34 +0200 From: Piotr Kubaj To: Guido Falsi Cc: Jan Beich , Kubilay Kocak , freebsd-ports@freebsd.org Subject: Re: Debugging ports Message-ID: <20171018075234.GA63797@smtp.iq.pl> References: <20171017160445.GA31080@smtp.iq.pl> <3bd75024-2458-d06a-afa6-9bb75414ff0d@FreeBSD.org> <4b870afb-152d-7ff4-73b5-cce742858346@madpilot.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: <4b870afb-152d-7ff4-73b5-cce742858346@madpilot.net> User-Agent: Mutt/1.9.1 (2017-09-22) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Oct 2017 07:52:41 -0000 --wac7ysb48OaltWcw Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Shouldn't lldb be the replacement for gdb in base? On 17-10-18 09:47:25, Guido Falsi wrote: >On 10/18/2017 06:33, Jan Beich wrote: >> Kubilay Kocak writes: >> >>> On 10/18/17 8:29 AM, Jan Beich wrote: >>> >>>> Guido Falsi writes: >>>> >>>>> On 10/17/2017 23:11, Guido Falsi wrote: >>>>> >>>>>>> >>>>>>> Thing is, recompiling with WITH_DEBUG doesn't help (I only get >>>>>>> memory addresses in gdb), nor does -DCMAKE_BUILD_TYPE=3DDebug to >>>>>>> CMAKE_ARGS (the port uses CMake). >>>>> >>>>> Sorry, I clearly did not parse your message correctly. >>>>> >>>>> Looks strange though, WITH_DEBUG always worked for me... Usually I >>>>> compile the whole set in poudriere with WITH_DEBUG, to make sure all >>>>> libraries have symbols too. >>>> >>>> WITH_DEBUG doesn't disable vendor optimizations like -fomit-frame-poin= ter >>>> which may hinder stack unwinding, doesn't enable debug symbols for por= ts >>>> not respecting CFLAGS, often a nop for non-C/C++ ports, etc. >>> >>> Could the framework WITH_DEBUG block remove this (and potentially) other >>> relevant flags from C*FLAGS if present with variable modifiers? >> >> Only for what make(1) inherits when Mk/bsd.port.mk is parsed. A lot more >> ports pass the option via makefiles under WRKSRC that cannot be altered >> short of patching or overriding all CFLAGS. >> >> To get accurate list of offenders an -exp run WITH_DEBUG=3D1 is required >> then grep(1) build logs for -fomit-frame-pointer and -O* flags. This can >> result in bugs against ports that fail to properly respect CFLAGS, so the >> port maintainers can help with patches. > >I'm preparing a patch related to WITH_DEBUG, which, if accepted, will >need an exp-run before going in. > >That would be a good chance to perform a check for these kind of things. > >But I'm still working on it and will need a little more time. I'll let >you know as soon as I have something I am willing to show. > >BTW on head gdb is gone from base for i386/amd64 AFAIK, so ports gdb >will be the only way to go in the future. > >--=20 >Guido Falsi > >--=20 >This message has been scanned for viruses and >dangerous content by MailScanner, and is >believed to be clean. > --=20 ________________________________________=20 / The student in question is performing \ | minimally for his peer group and is an | \ emerging underachiever. / ----------------------------------------=20 \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || --wac7ysb48OaltWcw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEycyIeNkkgohzsoorelmbhSCDnJ0FAlnnCEIACgkQelmbhSCD nJ0+uQ//SvTN4UXyIZk+eSqeMEoD2Hu3G7Tv+Ef12B5X8TgfQgc51qyOcPwRhgiM eNsbhTOz0Wf7BKxhLLi4cOy3/T/SLbrd3Fg9ODZYf8XsITNHyKnToToqhQY2iXtN ksaCVopKAkOxpg0Ac8ImzZEMJK9FDunWadvq+3cC35CydIPDAAWZKvu0QoWC+Mk/ ooM13wQoQbo72fFxGzKsnTYftWGe5UTqL9kz6q/bgFnZHCz6Ab7W1EClXIFvWK3t YtW9+yqyfXzVZ1I50fRdzwki7yM2CbIXGpwAh5cXtDo54yjkDGjWT5qTrOCqgwvN 0iss+464jTlyv0oJXBGV4ZNonhlrWS1BCeLOLvGtDyr30vPK2B0YvqYOzjxbqKbJ WSRArp/LiNNIAEH4i4QXX6+/BJs8RgmCdVEvgzFw3CplUzXDwhaoUbgfHrcg3Iy7 UirLbdX3pLFu3FaJ8z+w2F81ATK0CEjF/um2Xs6v/0QSSytHUxlCN7b/jcaX3/Oq bSYE2FIE7fnmGAB176Lm7gBXUbqPrzDe4Bk6ys1zwV1IvPeg5rYKeWr/Hxc2FfvS pF4rDZJ+UPfF+6Os+VGwyoUBfpD8EV0gZhEgeB5FNjJgngZxFCU+IpDkuv7J8SkF ECHBC+5l36vBw8UvJJUpiOXr18sU6ggBcwCRcNrcx+L9DEYhlRc= =iaMA -----END PGP SIGNATURE----- --wac7ysb48OaltWcw--