Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Kevin Pouget <kevin.pouget@gmail.com>
To: Ilya Basin <basinilya@gmail.com>
Cc: Jonas Maebe <jonas.maebe@elis.ugent.be>,
	Sergio Durigan Junior <sergiodj@redhat.com>,
	gdb@sourceware.org
Subject: Re: Re[2]: feature request: set step-mode smart
Date: Wed, 25 Apr 2012 10:55:00 -0000	[thread overview]
Message-ID: <CAPftXUK4JkxkzNuKM8xkQxtTP5pjYKYrEu4GA=qTVeigohT3tg@mail.gmail.com> (raw)
In-Reply-To: <20120425124001.Horde.7iYfQ0isJlFPl9SBVQNWqLA@mail.elis.ugent.be>

On Wed, Apr 25, 2012 at 12:40 PM, Jonas Maebe <jonas.maebe@elis.ugent.be> wrote:
>
>
> Ilya Basin wrote on Wed, 25 Apr 2012:
>
>
>> JM> up to figuring out yet. In the long term, it also does not seem
>> JM> tenable to add pattern recognition to gdb for stubs generated by all
>> JM> possible compilers (and possibly different versions of those
>> compilers).
>>
>> No one's speaking about pattern recognition.
>
>
> If gdb does not automatically step a number of instructions to see whether
> subsequent code has debug information, you need pattern recognition in gdb
> to automatically detect such situations and to avoid the problem you
> described (gdb skipping or stepping over such code, rather than stepping
> into it). See this thread:
> http://sourceware.org/ml/gdb/2009-04/msg00008.html
>
>
> Jonas
>


FWIW, I did something somehow similar lastly, which works fine if you
know the "profile" of your trampoline function (not re-tested):

>  gdb.execute("stepi")
>  start_frame = gdb.newest_frame()
>  while True:
>    start_frame = gdb.newest_frame()
>    gdb.execute("stepi")
>    new_frame = gdb.newest_frame()
>    if start_frame != new_frame:
>        break

this script should step into the trampoline function and execute its
assembly instructions until the first frame creation (function call).


Kevin


      reply	other threads:[~2012-04-25 10:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-21 11:07 Ilya Basin
2012-04-25  3:20 ` Sergio Durigan Junior
2012-04-25  9:44   ` Jonas Maebe
2012-04-25 10:08     ` Re[2]: " Ilya Basin
2012-04-25 10:40       ` Jonas Maebe
2012-04-25 10:55         ` Kevin Pouget [this message]

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='CAPftXUK4JkxkzNuKM8xkQxtTP5pjYKYrEu4GA=qTVeigohT3tg@mail.gmail.com' \
    --to=kevin.pouget@gmail.com \
    --cc=basinilya@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=jonas.maebe@elis.ugent.be \
    --cc=sergiodj@redhat.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