From: Daniel Jacobowitz <drow@false.org>
To: Michael Snyder <msnyder@redhat.com>
Cc: Amit Kale <amitkale@linsyssoft.com>,
GDB patches <gdb-patches@sources.redhat.com>
Subject: Re: [PATCH] preventing resuming of threads in gdbserver
Date: Tue, 10 Jan 2006 21:39:00 -0000 [thread overview]
Message-ID: <20060110213945.GA1535@nevyn.them.org> (raw)
In-Reply-To: <43C424D7.5040704@redhat.com>
On Tue, Jan 10, 2006 at 01:19:19PM -0800, Michael Snyder wrote:
> Amit Kale wrote:
> >Hi,
> >
> >gdb lets other threads continue execution during single stepping when
> >doing a single step in remote mode. This behavior causes thread switches
> >during step or next commands. Native mode behavior is opposite of it.
> >Attached patch changes it and makes it similar to native mode.
>
> Actually, letting other threads continue during single stepping
> is the norm. It happens on almost all multi-thread gdb targets.
Michael's right. It sometimes does not obviously manifest on native
targets, depending on the implementation of the native system's
scheduler.
> Indeed, if you don't allow it to happen, you're risking deadlock,
> and certainly changing the program behavior.
>
> Moreover, a patch that changes the behavior of *all* remote targets
> is going to be challenging to get approved.
>
>
>
> On the other hand, there is a user-setable mode variable
> called "scheduler-locking", which is meant to have the exact
> effect you are looking for. If you wanted to re-do your patch
> so that it made this change conditionally, under the control of
> that variable, it might be more acceptable.
Take a look at the implementation of scheduler-locking; this should
already work for gdbserver - and there's a testcase for it!
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-01-10 21:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-10 12:35 Amit Kale
2006-01-10 21:20 ` Michael Snyder
2006-01-10 21:39 ` Daniel Jacobowitz [this message]
2006-01-11 7:35 ` Amit Kale
2006-01-11 7:17 ` Amit Kale
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=20060110213945.GA1535@nevyn.them.org \
--to=drow@false.org \
--cc=amitkale@linsyssoft.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@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