This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
Re: Why GDB always jumps in and jumps out and seems uncontrollable when debug c++?
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Erming Pei <epei at cppm dot in2p3 dot fr>
- Cc: gdb at sourceware dot org, gdb-testers at sourceware dot org
- Date: Thu, 23 Mar 2006 14:34:43 -0800
- Subject: Re: Why GDB always jumps in and jumps out and seems uncontrollable when debug c++?
- References: <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