From: William Tambe <tambewilliam@gmail.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: gdb command "next" wrongly working as command "step"
Date: Fri, 23 Aug 2019 21:33:00 -0000 [thread overview]
Message-ID: <CAF8i9mMEsHE4C2FJnzBgL2mF8AoMrE5JP22LbVAKVKOCNwNs-Q@mail.gmail.com> (raw)
In-Reply-To: <20190818090556.GA19968@host1.jankratochvil.net>
On Sun, Aug 18, 2019 at 4:06 AM Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
>
> On Sun, 18 Aug 2019 10:31:54 +0200, William Tambe wrote:
> > Can I have suggestions of locations within the gdb code where I could
> > put breakpoints to trace where the issue I am having is occurring ?
>
> Check what "set debug infrun 1" says and grep the sources for the displayed
> messages.
>
Using "set debug infrun 1", I can see that GDB stops only after
printing the following message:
infrun: stepped to a different line.
When the above event happens, GDB has stepped inside the function,
which is obviously going to be on a different line; however, I am
expecting GDB to step over the function.
Within the single-step function gdbarch_software_single_step_ftype()
is there a way to tell whether GDB is stepping-into or stepping-over a
function ?
In fact within my implementation of
gdbarch_software_single_step_ftype() when the instruction
jump-and-link (used when calling a function) is decoded, the
breakpoint is placed at the jump target; I could instead place the
breakpoint after the instruction jump-and-link if I could tell whether
the GDB command "step"/"stepi" or "next"/"nexti" was used.
So within gdbarch_software_single_step_ftype(), is there a way to tell
whether GDB is stepping-into or stepping-over a function ?
>
> Jan
next prev parent reply other threads:[~2019-08-23 21:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-18 3:36 William Tambe
2019-08-18 4:16 ` Jan Kratochvil
2019-08-18 8:32 ` William Tambe
2019-08-18 9:06 ` Jan Kratochvil
2019-08-23 21:33 ` William Tambe [this message]
2019-08-23 21:54 ` Pedro Alves
2019-08-24 3:36 ` William Tambe
2019-08-25 19:04 ` William Tambe
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=CAF8i9mMEsHE4C2FJnzBgL2mF8AoMrE5JP22LbVAKVKOCNwNs-Q@mail.gmail.com \
--to=tambewilliam@gmail.com \
--cc=gdb@sourceware.org \
--cc=jan.kratochvil@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