From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24207 invoked by alias); 18 Mar 2010 02:39:51 -0000 Received: (qmail 24196 invoked by uid 22791); 18 Mar 2010 02:39:51 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from wbm5.pair.net (HELO wbm5.pair.net) (66.39.3.85) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 18 Mar 2010 02:39:46 +0000 Received: by wbm5.pair.net (Postfix, from userid 65534) id 655E534D4E; Wed, 17 Mar 2010 22:39:44 -0400 (EDT) Received: from 203.63.255.139 ([203.63.255.139]) (SquirrelMail authenticated user temp@sourceboost.com) by webmail5.pair.com with HTTP; Wed, 17 Mar 2010 22:39:44 -0400 (EDT) Message-ID: <11611.203.63.255.139.1268879984.squirrel@webmail5.pair.com> Date: Thu, 18 Mar 2010 02:39:00 -0000 Subject: Getting pissed off by gdb. Please help with stepping in. From: temp@sourceboost.com To: gdb@sourceware.org User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit References: In-Reply-To: X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00116.txt.bz2 I had to use gdb many times over the years all the time it pisses me off with one of its features and makes me move back to microsoft debugger as soon as possible. Now I want to get to the bottom of it and figure out if it's me or gdb. I'm talking about stepping into a function. Imagine a call to a function 'foo' that has one argument and the value of this argument is returned by a call to another function 'bar' like: ... foo( bar() ); ... All I want to do is to step into 'foo' without having to set any additional breakpoints. When I use microsoft debugger and do step into on this line I get into the function 'bar' first. Than I step out what brings me back to the line where 'foo' is called. I do another step into and get into 'foo'. When I debug same code under gdb and do step into I get into 'bar'. So far so good. I do a step out and wtf... Instead of getting back to the line where 'foo' is called I get passed it. My step out of 'bar' command caused call to 'foo' to execute as well. But I just wanted to step out of 'bar' but not have 'foo' executed yet. Not happy. So my question is it possible to step out of a function in gdb in code like above and remain on the line where this function was called from? What's the secret? Please advise. Pavel