From: Paul Koning <pkoning@equallogic.com>
To: kernel-hacker@bennee.com
Cc: gdb@sources.redhat.com
Subject: Re: Gcc options for improving debugging?
Date: Wed, 19 Jul 2006 17:33:00 -0000 [thread overview]
Message-ID: <17598.13370.591727.673308@gargle.gargle.HOWL> (raw)
In-Reply-To: <1153308778.9831.49.camel@okra.transitives.com>
>>>>> "Alex" == Alex Bennee <kernel-hacker@bennee.com> writes:
Alex> Hi, By default we build our software with -O3 which brings in a
Alex> host of optimisations which make following code in GDB a
Alex> pain.
Sure enough, exactly as documented.
Alex> An alternate approach is to compile with -O3 but turn off
Alex> specific optimisations which make life tricky for gdb. So far I
Alex> have:
Alex> * -ggdb3 (obviously) * -fno-omit-frame-pointer (seems to help
Alex> with finding some variables)
-ggdb3??? That's not an optimization option.
I find that the simplest and best answer is to do most debugging using
a version compiled with -O1. That gives you inline assembler,
inlining of things that are specifically called out to be inlined,
etc. But it doesn't do much instruction reordering.
paul
next prev parent reply other threads:[~2006-07-19 13:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-19 13:05 Alex Bennee
2006-07-19 13:31 ` Daniel Jacobowitz
2006-07-19 17:50 ` Alex Bennee
2006-07-19 17:53 ` Paul Koning
2006-07-20 15:21 ` Daniel Jacobowitz
2006-07-19 17:33 ` Paul Koning [this message]
2006-07-20 16:11 ` Frank Ch. Eigler
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=17598.13370.591727.673308@gargle.gargle.HOWL \
--to=pkoning@equallogic.com \
--cc=gdb@sources.redhat.com \
--cc=kernel-hacker@bennee.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox