Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Kris Warkentin" <kewarken@qnx.com>
To: "Eli Zaretskii" <eliz@is.elta.co.il>,
	"Bernd Jendrissek" <berndj@prism.co.za>
Cc: <gdb@sources.redhat.com>
Subject: Re: Who's insane: gdb or I?
Date: Wed, 03 Jul 2002 06:42:00 -0000	[thread overview]
Message-ID: <018301c22297$45175bc0$b6010c0a@catdog> (raw)
In-Reply-To: <Pine.SUN.3.91.1020703162042.22873B@is>

> On Wed, 3 Jul 2002, Bernd Jendrissek wrote:
>
> > Why did gdb tell me that the "OVERtime+=..." part happened several times
> > over?
>
> Because compiler optimizations move code around, so that the machine
> instructions generated for those two lines are interleaved.
>
> Simply get used to this.  I usually wait until the line shjown by GDB is
> after the one I'm interested in, and then print the relevant variables.

I get this all the time too so I usually debug code compiled without
optimization.  Unfortunately if you're chasing an optimization bug all bets
are off and, like Bernd said, you just have to get used to it.

cheers,

Kris


  reply	other threads:[~2002-07-03 13:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-03  6:16 Bernd Jendrissek
2002-07-03  6:24 ` Eli Zaretskii
2002-07-03  6:42   ` Kris Warkentin [this message]
2002-07-03  9:29 ` Carlo Wood
2002-07-05  3:05 ` Bernd Jendrissek
2002-07-05 18:23 ` Who's insane: gdb or I? (Answer: I am) Bernd Jendrissek

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='018301c22297$45175bc0$b6010c0a@catdog' \
    --to=kewarken@qnx.com \
    --cc=berndj@prism.co.za \
    --cc=eliz@is.elta.co.il \
    --cc=gdb@sources.redhat.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