From: Hui Zhu <teawater@gmail.com>
To: temp@sourceboost.com
Cc: gdb@sourceware.org
Subject: Re: Getting pissed off by gdb. Please help with stepping in.
Date: Thu, 18 Mar 2010 03:00:00 -0000 [thread overview]
Message-ID: <daef60381003172000p35ea7d60rc80b5a33b125314c@mail.gmail.com> (raw)
In-Reply-To: <11611.203.63.255.139.1268879984.squirrel@webmail5.pair.com>
s
#step into bar
finish
#finish the bar and into foo
On Thu, Mar 18, 2010 at 10:39, <temp@sourceboost.com> wrote:
> 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
>
>
>
>
>
>
next prev parent reply other threads:[~2010-03-18 3:00 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 2:39 temp
2010-03-18 3:00 ` Hui Zhu [this message]
2010-03-18 3:03 ` Nathan Froyd
2010-03-18 7:22 ` Doug Evans
2010-03-18 9:07 ` Eli Zaretskii
2010-03-18 15:10 ` Doug Evans
2010-03-18 15:21 ` Pedro Alves
2010-03-18 18:33 ` Eli Zaretskii
2010-03-18 18:55 ` Pedro Alves
2010-03-18 19:38 ` Eli Zaretskii
2010-03-18 19:54 ` Mark Kettenis
2010-03-18 20:43 ` Doug Evans
2010-03-18 20:51 ` Michael Snyder
2010-03-18 21:17 ` Pedro Alves
2010-03-18 21:12 ` Eli Zaretskii
2010-03-18 23:37 ` Paul Hilfinger
2010-03-19 9:51 ` Richard Earnshaw
2010-03-19 10:41 ` Mark Kettenis
2010-03-19 13:19 ` Eli Zaretskii
2010-03-19 10:19 ` André Pönitz
2010-03-18 15:28 ` Doug Evans
2010-03-18 18:31 ` Eli Zaretskii
2010-03-18 18:37 ` Paul Koning
2010-03-18 19:06 ` Doug Evans
2010-03-18 20:48 ` Jonas Maebe
2010-03-18 13:33 ` Daniel Jacobowitz
2010-03-18 14:06 ` André Pönitz
2010-03-18 14:13 ` Daniel Jacobowitz
2010-03-18 14:33 ` André Pönitz
2010-03-18 14:39 ` Daniel Jacobowitz
2010-03-18 14:54 ` André Pönitz
2010-03-18 15:40 ` Doug Evans
2010-03-18 17:41 ` Michael Snyder
2010-03-18 22:44 ` temp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=daef60381003172000p35ea7d60rc80b5a33b125314c@mail.gmail.com \
--to=teawater@gmail.com \
--cc=gdb@sourceware.org \
--cc=temp@sourceboost.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox