From: Orjan Friberg <orjan.friberg@axis.com>
To: gdb-patches@sources.redhat.com
Cc: Daniel Jacobowitz <drow@false.org>
Subject: Re: schedlock.exp questions
Date: Tue, 31 Aug 2004 14:41:00 -0000 [thread overview]
Message-ID: <41348DEA.9040807@axis.com> (raw)
In-Reply-To: <412F3E18.8030408@axis.com>
Orjan Friberg wrote:
> Daniel Jacobowitz wrote:
>
>>
>> This is a twisty and nasty part of infrun. It is full of bugs and
>> things that need to be rearchitected. So it's quite likely it doesn't
>> work right.
I did some more thinking, and maybe what you suggest does apply here.
The logic of it escapes me at least:
* Breakpoint is set
* Breakpoint is hit (by all threads)
* Some random thread (?) is reported by the gdbserver as stopped
* Breakpoint is deleted (leaving the other threads with a pending(*)
SIGTRAP)
Now, if a software single-step architecture (CRIS) is stepped, the
pending SIGTRAPs are reported by the gdbserver, but because we are
single-stepping thread_hop_needed is set in handle_inferior_event,
making GDB ignore the signal. Eventually, when the single-step target
is reached, we'll stop.
However, if we issue a "continue" instead of a "step", the SIGTRAPs are
*not* ignored, and GDB will show us as stopped due to a SIGTRAP at the
now removed breakpoint for each of the threads. I fail to see why the
behaviour in these two cases should be different. Is it because we
can't stop half-way through an ongoing software single-step?
For a hardware single-step architecture (CRISv32), the behaviour will be
the same regardless of whether we "step" or "continue" - GDB will stop
when the SIGTRAPs are received by the gdbserver.
(*) pending in the sense that gdbserver hasn't informed GDB of it yet
--
Orjan Friberg
Axis Communications
next prev parent reply other threads:[~2004-08-31 14:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-24 14:51 Orjan Friberg
2004-08-24 14:55 ` Daniel Jacobowitz
2004-08-25 15:11 ` Orjan Friberg
2004-08-25 16:03 ` Daniel Jacobowitz
2004-08-27 13:59 ` Orjan Friberg
2004-08-31 14:41 ` Orjan Friberg [this message]
2004-09-07 12:48 ` Orjan Friberg
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=41348DEA.9040807@axis.com \
--to=orjan.friberg@axis.com \
--cc=drow@false.org \
--cc=gdb-patches@sources.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