Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 May 2015 00:25:36 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        NGie Cooper <yaneurabeya@gmail.com>
Cc:        Alexander Kabaev <kabaev@gmail.com>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, Sean Bruno <sbruno@ignoranthack.me>
Subject:   Re: How to get anything useful out of kgdb?
Message-ID:  <2CEF3F4B-286C-47C5-B170-6CC017BE9D61@FreeBSD.org>
In-Reply-To: <CAGHfRMDWpPdqmGObTGuOT_FMQodbqbqW-gkhjMgca-pjS%2Ba2Jg@mail.gmail.com>
References:  <554E41EE.2010202@ignoranthack.me> <554E4BD1.1030802@ignoranthack.me> <406EAA27-D825-408B-985E-DC3FFE746473@frob.org> <554E5263.8010205@ignoranthack.me> <20150509190347.10e1e2c2@kan> <CAGHfRMAGTF0oh%2BR0kDxyx7PWSPfcTyZT-cMogF_LrV5pR2J4-w@mail.gmail.com> <CAGHfRMC10JJs7f9yzmNpeHNN8sM9ZFci1gpvqwqhvcGSQS4RXA@mail.gmail.com> <CAGHfRMDWpPdqmGObTGuOT_FMQodbqbqW-gkhjMgca-pjS%2Ba2Jg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <yaneurabeya@gmail.com> wrote:
> 
> On Mon, May 18, 2015 at 5:29 PM, NGie Cooper <yaneurabeya@gmail.com> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2CEF3F4B-286C-47C5-B170-6CC017BE9D61>