* How not to step into functions called as arguments of another function?
@ 2007-11-21 12:11 Peng Yu
2007-11-21 13:55 ` Michael Snyder
0 siblings, 1 reply; 3+ messages in thread
From: Peng Yu @ 2007-11-21 12:11 UTC (permalink / raw)
To: gdb
Hi,
Suppose I have two functions in C++.
void f(int x);
int g();
If I call "f(g())" in my program, when I want to step into f(), I have
to first step in g() first. I'm wondering whether there is simple way
to step into f() directly without stepping into g()?
Thanks,
Peng
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How not to step into functions called as arguments of another function?
2007-11-21 12:11 How not to step into functions called as arguments of another function? Peng Yu
@ 2007-11-21 13:55 ` Michael Snyder
2007-11-23 3:26 ` Joel Brobecker
0 siblings, 1 reply; 3+ messages in thread
From: Michael Snyder @ 2007-11-21 13:55 UTC (permalink / raw)
To: Peng Yu; +Cc: gdb
On Wed, 2007-11-21 at 06:11 -0600, Peng Yu wrote:
> Hi,
>
> Suppose I have two functions in C++.
>
> void f(int x);
>
> int g();
>
> If I call "f(g())" in my program, when I want to step into f(), I have
> to first step in g() first. I'm wondering whether there is simple way
> to step into f() directly without stepping into g()?
Not in one command, but in two:
(gdb) break f
(gdb) continue
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How not to step into functions called as arguments of another function?
2007-11-21 13:55 ` Michael Snyder
@ 2007-11-23 3:26 ` Joel Brobecker
0 siblings, 0 replies; 3+ messages in thread
From: Joel Brobecker @ 2007-11-23 3:26 UTC (permalink / raw)
To: Michael Snyder; +Cc: Peng Yu, gdb
> Not in one command, but in two:
> (gdb) break f
> (gdb) continue
Right, or often people will prefer the temporary breakpoint:
(gdb) tbreak f
(gdb) cont
It's actually a good idea to define a user command for that if this
is a common situation for you.
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-23 3:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-21 12:11 How not to step into functions called as arguments of another function? Peng Yu
2007-11-21 13:55 ` Michael Snyder
2007-11-23 3:26 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox