From: Luis Machado <luis.machado@arm.com>
To: "Denio, Mike" <miked@ti.com>, "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Step causes GDB to spin in infinite loop when PC doesn't change
Date: Fri, 18 Mar 2022 17:46:58 +0000 [thread overview]
Message-ID: <9f853649-6b9b-7ca0-b3e1-6c08c9c5757a@arm.com> (raw)
In-Reply-To: <e5f5e8af573f4b368954636f9d77084c@ti.com>
On 3/18/22 17:33, Denio, Mike wrote:
>>>>>
> That's what the step/next commands are designed to do. GDB will keep
> stepping until it sees a line change. I suppose a "continue" command
> here would be more appropriate, as GDB will send it once and keep
> waiting for the outcome. stepi/nexti would be undesirable given they
> will stop after a single instruction.
> <<<<
>
> Thanks that makes some level of sense. Stepi also works fine. It just seemed a little odd that the desired behavior would be to lock up GDB if a user accidentally did a "step" on a jump to $ instruction. You can't even get out with ^C. I had to kill the debug server to regain control of GDB.
I recall we used to have some issues like that, where GDB wouldn't stop
stepping and would give you enough time to ctrl-C your way out of it,
but they were fixed as far as I recall.
Are you using non-stop mode with synchronous commands? You might want to
try sending asynchronous commands (passing &), that way GDB will give
you the prompt instantly and you will have full control again. You can
then issue an interruption (interrupt -a) to stop everything.
next prev parent reply other threads:[~2022-03-18 17:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 17:33 Denio, Mike
2022-03-18 17:46 ` Luis Machado [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-03-18 17:57 Denio, Mike
2022-03-18 18:39 ` Pedro Alves
[not found] ` <928a31c6f548411084f4a30dff48e1fe@ti.com>
2022-03-18 20:57 ` Denio, Mike
2022-03-18 16:33 Denio, Mike
2022-03-18 17:28 ` Luis Machado
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=9f853649-6b9b-7ca0-b3e1-6c08c9c5757a@arm.com \
--to=luis.machado@arm.com \
--cc=gdb@sourceware.org \
--cc=miked@ti.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).