Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@gnat.com>
To: Tron Thomas <tron.thomas@verizon.net>, gdb@sources.redhat.com
Subject: Re: How to step into multi-command statements
Date: Sun, 22 Aug 2004 10:53:00 -0000	[thread overview]
Message-ID: <20040822105309.GB3447@gnat.com> (raw)
In-Reply-To: <20040821174121.GA7442@white>

> You need to 'step', 'finish', 'step', 'finish', until you get to the
> function that you want.

Funny. One of our users actually asked for an enhancement to implement
a function that would do a step-last, ie step into the last function
being called in the line of code. For instance, given the following 
code:

         Foo (A, Bar (B));

steplast would land inside Foo, not Bar.

The premise for this request was that WDB, the HP/UX debugger, was
implementing it.

I looked at HP's implementation, and they were basically using two
approaches, as far as I can remember:
  - heuristics, knowing how calls where implemented on their target
    (this is for older versions of their compiler)
  - debug info, generated by their recent compiler.

We are still not exactly sure that this would be very useful
enhancement, especially if we don't get any help from the compiler
as the HP compiler does. Right now, our position is that it is easy
to write a user-command that does something close:

         define stepfunc
             tbreak $arg0
             cont
         end

With the function above, it's not entirely automatic, as you have
to give the name of the function you want to step in, but it is also
more flexible, as you can step into the function you want, it doesn't
have to be the last function called.

Food for thoughts...

-- 
Joel


  reply	other threads:[~2004-08-22 10:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-21 17:30 Tron Thomas
2004-08-21 17:41 ` Bob Rossi
2004-08-22 10:53   ` Joel Brobecker [this message]
2004-08-23 17:05 ` Andrew Cagney

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=20040822105309.GB3447@gnat.com \
    --to=brobecker@gnat.com \
    --cc=gdb@sources.redhat.com \
    --cc=tron.thomas@verizon.net \
    /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