Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: ikorot@earthlink.net
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Novice gdb question
Date: Mon, 06 Jul 2009 03:11:00 -0000	[thread overview]
Message-ID: <4933903.1246849878501.JavaMail.root@mswamui-thinleaf.atl.sa.earthlink.net> (raw)

Hi, Paul,
I'm sorry if my question was not clear enough.
Let me put some clarification on it.

-----Original Message-----
>From: Paul Pluzhnikov <ppluzhnikov@google.com>
>Sent: Jul 4, 2009 8:19 PM
>To: ikorot@earthlink.net, "gdb@sourceware.org" <gdb@sourceware.org>
>Subject: Re: Novice gdb question
>
>On Fri, Jul 3, 2009 at 3:15 PM, Daniel Jacobowitz<drow@false.org> wrote:
>> On Fri, Jul 03, 2009 at 01:04:16PM -0700, ikorot@earthlink.net wrote:
>>> Is it possible to make gdb aware of the inline-ness and make it work as MSVC
>>> debugger?
>>
>> Build GDB from CVS.  Inline function support was added last week.
>
>It will work, but not the same way MSVC does.
>
>It's not clear from OP description whether he used debug (no actual
>inlining happening!) or optimized (AFAICT no source level debugging
>AFACT) build. In addition, at least in VC2008 there is no "next", only
>"step over" (F10) and "step into" (F11). Finally, if there actually is
>a version of MSVC which behaves as OP described, that behavior is
>arguably more broken that GDB's was before inline fixes.

Consider following code snippet:

class Foo
{
public:
       int inilineGetParam() { return m_member; };
       void Bar( int param );
private:
       int m_member;
}

int main()
{
     Foo f;
     f.Bar( f.inlineGetParam() );
    printf( "Done!");
}

In MSVC debugger and gdb, when I hit F11 standing on the line "f.Bar(....)", I will 
go to the "f.inilineFunc()" line. Now in MSVC hitting F10, brings me back to the line
"f.Bar(...)" so I can decide whether I want to go to the "printf" line or step inside "f.Bar"
In gdb saying "next", which I believe the same as F10 function in MSVC debugger, brings
me to the line with the "printf();"

If you are saying that this what will happen in the next release of gdb I will just wait for it.

Thank you.

>
>
>-- 
>Paul Pluzhnikov


             reply	other threads:[~2009-07-06  3:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-06  3:11 ikorot [this message]
2009-07-06  3:26 ` Paul Pluzhnikov
  -- strict thread matches above, loose matches on Subject: below --
2009-07-03 20:04 ikorot
2009-07-03 22:15 ` Daniel Jacobowitz
2009-07-05  0:19   ` Paul Pluzhnikov

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=4933903.1246849878501.JavaMail.root@mswamui-thinleaf.atl.sa.earthlink.net \
    --to=ikorot@earthlink.net \
    --cc=gdb@sourceware.org \
    /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