Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Erming Pei <epei@cppm.in2p3.fr>
Cc: gdb@sourceware.org, gdb-testers@sourceware.org
Subject: Re: Why GDB always jumps in and jumps out and seems uncontrollable when  debug c++?
Date: Fri, 24 Mar 2006 02:37:00 -0000	[thread overview]
Message-ID: <20060323223443.GN31416@adacore.com> (raw)
In-Reply-To: <4422EE06.3090906@cppm.in2p3.fr>

> Besides, I've set the step-mode off. And before debug, I set CFLAGS=-g 
> -O2 CXXFLAGS= -g -O2 CC = gcc  CPP = gcc -E  CXX = g++ CPPFLAGS = -Wall 
> -g -Wno-deprecated.

I think that it will be easier to debug if you remove the -O2.
What you are seeing in the jumping around is compiler optimizing
your code and doing what I think compiler experts call instruction
scheduling.

-- 
Joel


      reply	other threads:[~2006-03-23 22:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-23 22:34 Erming Pei
2006-03-24  2:37 ` Joel Brobecker [this message]

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=20060323223443.GN31416@adacore.com \
    --to=brobecker@adacore.com \
    --cc=epei@cppm.in2p3.fr \
    --cc=gdb-testers@sourceware.org \
    --cc=gdb@sourceware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox