Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Peng Yu <pengyu.ut@gmail.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: How step over a ass call command?
Date: Sun, 05 Oct 2014 22:59:00 -0000	[thread overview]
Message-ID: <CABrM6wnra-GjF0su9X1fZS7GqvuRJU9eHyt_9_AbQcU=kKgZAg@mail.gmail.com> (raw)
In-Reply-To: <CAMo8BfJCdAsLDPD-Sxbp2xeG907difmfCC9Qs-Sc-Z2ObDe-Sg@mail.gmail.com>

On Sun, Oct 5, 2014 at 5:31 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> On Mon, Oct 6, 2014 at 2:12 AM, Peng Yu <pengyu.ut@gmail.com> wrote:
>> Suppose that I use gdb with a binary file with source stripped.
>>
>>    0x1ea7 <main+45>:    mov    %eax,(%esp)
>>    0x1eaa <main+48>:    call   0x1f14
>>    0x1eaf <main+53>:    mov    0x1180(%ebx),%ecx
>>
>> Suppose that pc is at 0x1ea7 and I want to step 2 instructions to
>> 0x1eaf and without stopping inside call 0x1f14. "stepi" does not seem
>> to work in this case (my guess is that it only works with source code
>> for skipping function calls, but not at the assembly level.)
>>
>> Does anybody know what is the best way to get to the line 0x1eaf? (I
>> could set a breakpoint at 0x1eaf, but I found this is too cumbersome.)
>
> Try nexti, which is defined as
>     Execute one machine instruction, but if it is a function call, proceed
>     until the function returns

I am sorry. I meant to say "nexti" in my original email. "nexti" seems
to the same as "stepi" when the source code is stripped. Is it
supposed to be so?

-- 
Regards,
Peng


  reply	other threads:[~2014-10-05 22:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-05 22:12 Peng Yu
2014-10-05 22:31 ` Max Filippov
2014-10-05 22:59   ` Peng Yu [this message]
2014-10-07 14:23     ` Yao Qi
2014-10-07 16:24       ` Pedro Alves
2014-10-07 16:26         ` Pedro Alves

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='CABrM6wnra-GjF0su9X1fZS7GqvuRJU9eHyt_9_AbQcU=kKgZAg@mail.gmail.com' \
    --to=pengyu.ut@gmail.com \
    --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