Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Paul Koning <pkoning@equallogic.com>
Cc: kernel-hacker@bennee.com, gdb@sources.redhat.com
Subject: Re: Gcc options for improving debugging?
Date: Thu, 20 Jul 2006 15:21:00 -0000	[thread overview]
Message-ID: <20060719175248.GA25814@nevyn.them.org> (raw)
In-Reply-To: <17598.28866.916402.335524@gargle.gargle.HOWL>

On Wed, Jul 19, 2006 at 01:49:54PM -0400, Paul Koning wrote:
> >>>>> "Alex" == Alex Bennee <kernel-hacker@bennee.com> writes:
> 
>  Alex> Is it the inlineing that's causing the variables to get
>  Alex> optimised away??? 
> 
> No.  GCC can make variables go away without any inlining.  And even if
> a variable isn't optimized away completely, it can become "dead" at
> some point (when it is not needed in the rest of the function).  When
> that happens, the register gets reused but GDB doesn't necessarily
> know that.  So you can still see the variable but the values it
> appears to have are wrong because that register now contains something
> else.

In addition to what Paul said:  Alex, you may want to try upgrading to
GDB 6.5.  Previous versions had a much more annoying behavior when this
happened, but 6.5 is better about it; from your initial report I guess
you're using something earlier.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-07-19 17:53 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 [this message]
2006-07-19 17:33 ` Paul Koning
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=20060719175248.GA25814@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=kernel-hacker@bennee.com \
    --cc=pkoning@equallogic.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