This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why GDB always jumps in and jumps out and seems uncontrollable when debug c++?


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]