Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Bill Morgan <arthurwilliammorgan@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: arm remote step using software breakpoints doesn't finish the step
Date: Wed, 14 Nov 2018 22:35:00 -0000	[thread overview]
Message-ID: <6527be25458327577a69fa4e8bd01b7d@polymtl.ca> (raw)
In-Reply-To: <CAM4wpo-r7R8SkqUsK0uAMxsKm=vKzk6kt-dqQE+ku6dF49fS_g@mail.gmail.com>

On 2018-11-05 19:24, Bill Morgan wrote:
> On Mon, Nov 5, 2018 at 11:42 AM Bill Morgan 
> <arthurwilliammorgan@gmail.com>
> wrote:
> 
>> For some reason GDB is setting breakpoints in an order that is causing 
>> a
>> step to never finish.
>> 
>> It sets a breakpoint at 0x22637fd0, then that breakpoint is hit, then 
>> sets
>> one at 0x22637fd4, then that one is hit, then it puts one back at
>> 0x22637fd0 again and the remote code runs until it loops back into 
>> this
>> function again and fd0 is hit again, then sets bp at 0x22637fd4 again,
>> etc., so the result is that the step never finishes.
>> 
>> I'm wondering why it didn't set one at fd8.
>> 
>> Any ideas?
>> 
> 
> I found an issue in my remote stub. I had multiple threads in the 
> address
> space with the breakpoint.
> 
> Thread 0x1f was current, but 0x1e was resuming first and hitting the
> stepping breakpoint, so GDB kept trying to get 0x1f to hit the 
> breakpoint
> for the step.
> 
> I changed to always resume the current thread first so it has a chance 
> to
> hit the stepping breakpoint.

Hi Bill,

Good to know you managed to solve it.  You can always look at how 
gdbserver does to get inspiration.  I know that in some cases, it 
randomizes the order in which it processes events to avoid starving 
threads like that.

Simon


      reply	other threads:[~2018-11-14 22:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05 17:42 Bill Morgan
2018-11-06  0:24 ` Bill Morgan
2018-11-14 22:35   ` Simon Marchi [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=6527be25458327577a69fa4e8bd01b7d@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=arthurwilliammorgan@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