public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* c++/2170: cant step into more than 1 function call on a single line
@ 2006-09-08 21:28 intangir
  0 siblings, 0 replies; 2+ messages in thread
From: intangir @ 2006-09-08 21:28 UTC (permalink / raw)
  To: gdb-gnats


>Number:         2170
>Category:       c++
>Synopsis:       cant step into more than 1 function call on a single line
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 08 21:28:02 UTC 2006
>Closed-Date:
>Last-Modified:
>Originator:     intangir@gmail.com
>Release:        unknown-1.0
>Organization:
>Environment:
Ubuntu 6.06, gdb 6.4
>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 ;(
>How-To-Repeat:
make some code that makes a function call with args that are returns from other function calls

step into the function call (it calls the functions to get the args first, if you stepover while in those functions that returns args it will step over the rest the line in the original scope)

int givea() { return 1; }
int giveb() { return 2; }

void functioniwanttostepinto(int a, int b)
{
  int c = a + b; // try and debug to THIS line. it is a pain
  // even more so if there are TONS of nested calls
  // and overloaded operators
}

void main()
{
  functioniwanttostepinto(givea(), giveb()); // *
}

* when you step into that line it steps into givea or giveb first, and unless you step into EACH LINE in both givea AND giveb, then you cant step into 'functioniwanttostepinto'

and if there is alot of code in givea, giveb it becomes a huge pain in the ass..

>Fix:
when stepping over (or stepping out) of a function that was called from a line that has more than 1 function call, when it returns to the calling scope, it should break on the same line  it originally stepped in from. this way you can step into more function calls on the same line

this is how visual studio does it, and going from visual studio to gdb .. this feature is SOOORELY missed on more complex c++ code
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/2170: cant step into more than 1 function call on a single line
@ 2007-05-18 20:24 drow
  0 siblings, 0 replies; 2+ messages in thread
From: drow @ 2007-05-18 20:24 UTC (permalink / raw)
  To: gdb-prs, intangir, nobody

Synopsis: cant step into more than 1 function call on a single line

State-Changed-From-To: open->closed
State-Changed-By: drow
State-Changed-When: Fri May 18 20:24:08 2007
State-Changed-Why:
    Duplicate of 2169.

http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=2170


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-18 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-08 21:28 c++/2170: cant step into more than 1 function call on a single line intangir
2007-05-18 20:24 drow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).