From owner-freebsd-hackers@FreeBSD.ORG Tue May 19 22:25:57 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A7D07328 for ; Tue, 19 May 2015 22:25:57 +0000 (UTC) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:0:20e:cff:fea0:e4a2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 630C41EBF for ; Tue, 19 May 2015 22:25:57 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::9416:1fb6:b77b:39fb] (unknown [IPv6:2001:7b8:3a7:0:9416:1fb6:b77b:39fb]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DAE27239FB; Wed, 20 May 2015 00:25:52 +0200 (CEST) Subject: Re: How to get anything useful out of kgdb? Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/signed; boundary="Apple-Mail=_0CED5C5B-CFB9-4493-86FA-26E7855890CE"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b6 From: Dimitry Andric In-Reply-To: Date: Wed, 20 May 2015 00:25:36 +0200 Cc: Alexander Kabaev , "freebsd-hackers@freebsd.org" , Sean Bruno Message-Id: <2CEF3F4B-286C-47C5-B170-6CC017BE9D61@FreeBSD.org> References: <554E41EE.2010202@ignoranthack.me> <554E4BD1.1030802@ignoranthack.me> <406EAA27-D825-408B-985E-DC3FFE746473@frob.org> <554E5263.8010205@ignoranthack.me> <20150509190347.10e1e2c2@kan> To: NGie Cooper X-Mailer: Apple Mail (2.2098) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 May 2015 22:25:57 -0000 --Apple-Mail=_0CED5C5B-CFB9-4493-86FA-26E7855890CE Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 19 May 2015, at 21:32, NGie Cooper wrote: > > On Mon, May 18, 2015 at 5:29 PM, NGie Cooper wrote: > >> As a sidenote, this has been broken for over a decade: >> https://svnweb.freebsd.org/base?view=revision&revision=127204 :(... > > -O is synonymous with -O2 (both on clang and gcc) :(... No, for gcc -O has always meant -O1. For clang, it means -O2. If you want -O1, please specify it. :) Though with clang I don't think you will see too much difference regarding variables which have been put in registers, or eliminated altogether, making it harder to follow for gdb (especially the ancient version in base). If you want to have everything fully traceable, use -O0, and increase your kernel stack size, otherwise it is likely to blow up. -Dimitry --Apple-Mail=_0CED5C5B-CFB9-4493-86FA-26E7855890CE Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.27 iEYEARECAAYFAlVbuHAACgkQsF6jCi4glqMKvgCdGWG7yPtvWnYyhJw4WIm1C9rV koAAoIuY4LY2JuiICHrs4LlAh46L+UFj =K5AT -----END PGP SIGNATURE----- --Apple-Mail=_0CED5C5B-CFB9-4493-86FA-26E7855890CE--