From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4014 invoked by alias); 23 Mar 2006 22:34:51 -0000 Received: (qmail 3992 invoked by uid 22791); 23 Mar 2006 22:34:49 -0000 X-Spam-Check-By: sourceware.org Received: from nile.gnat.com (HELO nile.gnat.com) (205.232.38.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 23 Mar 2006 22:34:47 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-nile.gnat.com (Postfix) with ESMTP id DF62148CE79; Thu, 23 Mar 2006 17:34:44 -0500 (EST) Received: from nile.gnat.com ([127.0.0.1]) by localhost (nile.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 18542-01-10; Thu, 23 Mar 2006 17:34:44 -0500 (EST) Received: from takamaka.act-europe.fr (s142-179-108-108.bc.hsia.telus.net [142.179.108.108]) by nile.gnat.com (Postfix) with ESMTP id 94D4D48CE50; Thu, 23 Mar 2006 17:34:44 -0500 (EST) Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 35D8947E7F; Thu, 23 Mar 2006 14:34:43 -0800 (PST) Date: Fri, 24 Mar 2006 02:37:00 -0000 From: Joel Brobecker To: Erming Pei Cc: gdb@sourceware.org, gdb-testers@sourceware.org Subject: Re: Why GDB always jumps in and jumps out and seems uncontrollable when debug c++? Message-ID: <20060323223443.GN31416@adacore.com> References: <4422EE06.3090906@cppm.in2p3.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4422EE06.3090906@cppm.in2p3.fr> User-Agent: Mutt/1.4i Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-03/txt/msg00169.txt.bz2 > 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