From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Daniel P. Berrangé" <berrange@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Should configure --enable-debug add -Og to CFLAGS?
Date: Thu, 27 Jun 2019 18:45:02 +0200 [thread overview]
Message-ID: <87ftnvasfl.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <655a1ac0-bbd9-9798-4e44-478f94afb86f@redhat.com> (Paolo Bonzini's message of "Thu, 27 Jun 2019 18:01:13 +0200")
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 27/06/19 17:43, Markus Armbruster wrote:
>> The fine manual advises:
>>
>> '-O0'
>> Reduce compilation time and make debugging produce the expected
>> results. This is the default.
>> [...]
>> '-Og'
>> Optimize debugging experience. '-Og' should be the optimization
>> level of choice for the standard edit-compile-debug cycle, offering
>> a reasonable level of optimization while maintaining fast
>> compilation and a good debugging experience. It is a better choice
>> than '-O0' for producing debuggable code because some compiler
>> passes that collect debug information are disabled at '-O0'.
>>
>> Our configure --enable-debug effectively picks -O0. Should it pick -Og
>> instead?
>>
>
> commit 48e56d503e18bd1e8a75463fd7cc1580bf7e7650
> Author: Paolo Bonzini <pbonzini@redhat.com>
> Date: Tue Mar 6 11:32:44 2018 +0100
>
> Revert "build-sys: compile with -Og or -O1 when --enable-debug"
>
> This reverts commit 906548689e37ab6cca1e93b3f8d9327a4e17e8af.
> Even with -Og, the debug experience is noticeably worse
> because gdb shows a lot more "<optimised out>" variables and
> function arguments.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>
> :(
Aha, GCC's documentation is more aspirational than factual here.
Nevermind!
next prev parent reply other threads:[~2019-06-27 17:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-27 15:43 [Qemu-devel] Should configure --enable-debug add -Og to CFLAGS? Markus Armbruster
2019-06-27 16:01 ` Paolo Bonzini
2019-06-27 16:45 ` Markus Armbruster [this message]
2019-06-27 16:02 ` Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ftnvasfl.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.