logo       

Re: c++/2169: cant step into more than 1 function call on a single line: msg#00019

Subject: Re: c++/2169: cant step into more than 1 function call on a single line
The following reply was made to PR c++/2169; it has been noted by GNATS.

From: Daniel Jacobowitz <drow@xxxxxxxxx>
To: intangir@xxxxxxxxx, Thomas McGuire <thomas.mcguire@xxxxxxx>
Cc: gdb-gnats@xxxxxxxxxxxxxxxxxx
Subject: Re: c++/2169: cant step into more than 1 function call on a single
        line
Date: Fri, 18 May 2007 16:23:39 -0400

 Sorry I didn't see this report earlier.
 
 On Fri, Sep 08, 2006 at 09:23:28PM -0000, intangir@xxxxxxxxx wrote:
 > >Description:
 > when debugging C++, if there is more than one call (or overloaded operators) 
 > on a single line, when you step in, it steps in the first call, if its not 
 > the one you wanted to step into you have to step into every single line in 
 > that function till you get back out to the original line you want to step 
 > into.. 
 > 
 > if you step over then when it returns to the original scope it steps over 
 > the rest of the line that you needed to step into.. and you miss your chance 
 > to step into it ;(
 
 Use "finish":
 
 (gdb) start
 Breakpoint 1 at 0x40056b: file z.cc, line 13.
 Starting program: /space/codesourcery/mips64-build/z
 main () at z.cc:13
 13        functioniwanttostepinto(givea(), giveb()); // *
 (gdb) s
 giveb () at z.cc:2
 2       int giveb() { return 2; }
 (gdb) fin
 Run till exit from #0  giveb () at z.cc:2
 0x0000000000400570 in main () at z.cc:13
 13        functioniwanttostepinto(givea(), giveb()); // *
 Value returned is $1 = 2
 (gdb) s
 givea () at z.cc:1
 1       int givea() { return 1; }
 (gdb) fin
 Run till exit from #0  givea () at z.cc:1
 0x0000000000400577 in main () at z.cc:13
 13        functioniwanttostepinto(givea(), giveb()); // *
 Value returned is $2 = 1
 (gdb) s
 functioniwanttostepinto (a=1, b=2) at z.cc:6
 6         int c = a + b; // try and debug to THIS line. it is a pain
 
 The behavior that "next" steps over other calls on the same line is
 unfortunate in your case, but deliberate - it makes some other cases
 clearer.
 
 -- 
 Daniel Jacobowitz
 CodeSourcery



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe